Skip to content

[Core Aten Ops] Lower reflection_pad1d, reflection_pad1d_backward, reflection_pad3d and reflection_pad3d_backward#6588

Merged
wonjoo-wj merged 19 commits intomasterfrom
ManfeiBai-patch-72
Feb 23, 2024
Merged

[Core Aten Ops] Lower reflection_pad1d, reflection_pad1d_backward, reflection_pad3d and reflection_pad3d_backward#6588
wonjoo-wj merged 19 commits intomasterfrom
ManfeiBai-patch-72

Conversation

@ManfeiBai
Copy link
Copy Markdown
Collaborator

@ManfeiBai ManfeiBai commented Feb 22, 2024

fix #6577


follow PR for #6559


Test

# pytest test/test_core_aten_ops.py -k test_aten_reflection_pad1d_0
=========================== test session starts ============================
platform linux -- Python 3.10.13, pytest-8.0.1, pluggy-1.4.0
rootdir: /root/pytorch
configfile: pytest.ini
plugins: hypothesis-6.98.9
collected 490 items / 489 deselected / 1 selected                          

test/test_core_aten_ops.py WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1708580905.348960  120407 pjrt_api.cc:100] GetPjrtApi was found for tpu at /root/miniconda3/envs/newtorch310/lib/python3.10/site-packages/libtpu/libtpu.so
I0000 00:00:1708580905.349050  120407 pjrt_api.cc:79] PJRT_Api is set for device type tpu
I0000 00:00:1708580905.349063  120407 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.40. The framework PJRT API version is 0.40.
.                                         [100%]

==================== 1 passed, 489 deselected in 6.52s =====================
# pytest test/test_core_aten_ops.py -k test_aten_reflection_pad1d_1
=========================== test session starts ============================
platform linux -- Python 3.10.13, pytest-8.0.1, pluggy-1.4.0
rootdir: /root/pytorch
configfile: pytest.ini
plugins: hypothesis-6.98.9
collected 490 items / 489 deselected / 1 selected                          

test/test_core_aten_ops.py WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1708580948.256937  122008 pjrt_api.cc:100] GetPjrtApi was found for tpu at /root/miniconda3/envs/newtorch310/lib/python3.10/site-packages/libtpu/libtpu.so
I0000 00:00:1708580948.257028  122008 pjrt_api.cc:79] PJRT_Api is set for device type tpu
I0000 00:00:1708580948.257039  122008 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.40. The framework PJRT API version is 0.40.
.                                         [100%]

==================== 1 passed, 489 deselected in 6.77s =====================
# pytest test/test_core_aten_ops.py -k test_aten_reflection_pad3d_0
=========================== test session starts ============================
platform linux -- Python 3.10.13, pytest-8.0.1, pluggy-1.4.0
rootdir: /root/pytorch
configfile: pytest.ini
plugins: hypothesis-6.98.9
collected 490 items / 489 deselected / 1 selected                          

test/test_core_aten_ops.py WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1708580959.660941  123608 pjrt_api.cc:100] GetPjrtApi was found for tpu at /root/miniconda3/envs/newtorch310/lib/python3.10/site-packages/libtpu/libtpu.so
I0000 00:00:1708580959.661037  123608 pjrt_api.cc:79] PJRT_Api is set for device type tpu
I0000 00:00:1708580959.661047  123608 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.40. The framework PJRT API version is 0.40.
.                                         [100%]

==================== 1 passed, 489 deselected in 6.89s =====================
# pytest test/test_core_aten_ops.py -k test_aten_reflection_pad3d_1
=========================== test session starts ============================
platform linux -- Python 3.10.13, pytest-8.0.1, pluggy-1.4.0
rootdir: /root/pytorch
configfile: pytest.ini
plugins: hypothesis-6.98.9
collected 490 items / 489 deselected / 1 selected                          

test/test_core_aten_ops.py WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1708580971.032931  125211 pjrt_api.cc:100] GetPjrtApi was found for tpu at /root/miniconda3/envs/newtorch310/lib/python3.10/site-packages/libtpu/libtpu.so
I0000 00:00:1708580971.033014  125211 pjrt_api.cc:79] PJRT_Api is set for device type tpu
I0000 00:00:1708580971.033027  125211 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.40. The framework PJRT API version is 0.40.
.                                         [100%]

==================== 1 passed, 489 deselected in 6.94s =====================
# pytest test/test_core_aten_ops.py -k test_aten_reflection_pad3d_2
=========================== test session starts ============================
platform linux -- Python 3.10.13, pytest-8.0.1, pluggy-1.4.0
rootdir: /root/pytorch
configfile: pytest.ini
plugins: hypothesis-6.98.9
collected 490 items / 489 deselected / 1 selected                          

test/test_core_aten_ops.py WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1708580982.132929  126817 pjrt_api.cc:100] GetPjrtApi was found for tpu at /root/miniconda3/envs/newtorch310/lib/python3.10/site-packages/libtpu/libtpu.so
I0000 00:00:1708580982.133012  126817 pjrt_api.cc:79] PJRT_Api is set for device type tpu
I0000 00:00:1708580982.133025  126817 pjrt_api.cc:146] The PJRT plugin has PJRT API version 0.40. The framework PJRT API version is 0.40.
.                                         [100%]

==================== 1 passed, 489 deselected in 6.77s =====================

Notice: we keep use BuildReflectionPadBackward and BuildReflectionPad2d here due to the at::aten::reflection_pad2d_backward named already: code

@ManfeiBai ManfeiBai changed the title Update xla_native_functions.yaml [Core Aten Ops] Lower reflection_pad1d, reflection_pad1d_backward, reflection_pad3d and reflection_pad3d_backward Feb 22, 2024
@ManfeiBai ManfeiBai marked this pull request as ready for review February 22, 2024 06:14
@ManfeiBai ManfeiBai requested a review from wonjoo-wj February 22, 2024 06:15
@wonjoo-wj
Copy link
Copy Markdown
Collaborator

Thanks for getting this PR out so quickly. I'll take a look tomorrow morning, thanks!

@wonjoo-wj
Copy link
Copy Markdown
Collaborator

Seems like the CPP tests are failing, can you take a look? Thanks!

@ManfeiBai
Copy link
Copy Markdown
Collaborator Author

ManfeiBai commented Feb 22, 2024

Seems like the CPP tests are failing, can you take a look? Thanks!

Thanks, they are failed due to the padding dimension, pushed new commit and triggered test again

Copy link
Copy Markdown
Collaborator

@wonjoo-wj wonjoo-wj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@wonjoo-wj
Copy link
Copy Markdown
Collaborator

Kokoro build failure timeout should be fixed on master, I'll merge this.

@wonjoo-wj wonjoo-wj merged commit 13e8647 into master Feb 23, 2024
amithrm pushed a commit to amithrm/xla that referenced this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Core ATen Opset] Lower aten_reflection_pad1d and aten_reflection_pad3d

3 participants