Skip to content

Conversation

@PenghuiCheng
Copy link
Contributor

@PenghuiCheng PenghuiCheng commented Oct 15, 2024

The "scatter_add" op with the deterministic mode in XPU device is not implemented, it will report that "scatter_add_kernel" does not have a deterministic implementation in UT.

Just like the implementation of CUDA, we need to check _deterministic_algorithms in scatter_add op for the XPU device.

The UT is in: https://github.com/intel/torch-xpu-ops/blob/main/test/xpu/test_scatter_gather_ops_xpu.py. We reused PyTorch UT code.
Now the UT case is skipped in torch-xpu-ops test. Will open it when this PR is merged.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 15, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137966

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 1b26d16 with merge base 565a794 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 15, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@EikanWang EikanWang marked this pull request as draft October 15, 2024 07:13
@EikanWang EikanWang changed the title avoid gpuAtomicAdd for XPU device for satter_add by deterministic mode [WIP] avoid gpuAtomicAdd for XPU device for satter_add by deterministic mode Oct 15, 2024
@EikanWang
Copy link
Collaborator

May I know what's the impact? Does it lead to any case failure?

@EikanWang EikanWang added topic: not user facing topic category ciflow/xpu Run XPU CI tasks labels Oct 15, 2024
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 15, 2024

Please seek CI approval before scheduling CIFlow labels

@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Oct 15, 2024
@EikanWang
Copy link
Collaborator

Please add test cases.

@PenghuiCheng PenghuiCheng changed the title [WIP] avoid gpuAtomicAdd for XPU device for satter_add by deterministic mode [WIP] avoid atomic add for XPU device in satter_add by deterministic mode Oct 16, 2024
@PenghuiCheng
Copy link
Contributor Author

PenghuiCheng commented Oct 18, 2024

May I know what's the impact? Does it lead to any case failure?

Yes, the UT covered in https://github.com/intel/torch-xpu-ops/blob/main/test/xpu/test_scatter_gather_ops_xpu.py.
"test_scatter_reduce_mean_xpu_bfloat16",
"test_scatter_reduce_mean_xpu_float16",
"test_scatter_reduce_mean_xpu_float32",
"test_scatter_reduce_mean_xpu_float64",
"test_scatter_reduce_mean_xpu_int16",
"test_scatter_reduce_mean_xpu_int32",
"test_scatter_reduce_mean_xpu_int64",
"test_scatter_reduce_mean_xpu_int8",
"test_scatter_reduce_mean_xpu_uint8"

@EikanWang EikanWang added the ciflow/xpu Run XPU CI tasks label Oct 24, 2024
@PenghuiCheng PenghuiCheng marked this pull request as ready for review November 5, 2024 07:08
@PenghuiCheng PenghuiCheng force-pushed the penghuic/scatter_add_deterministic branch 2 times, most recently from 3d7a311 to fc26d80 Compare November 7, 2024 08:08
@PenghuiCheng PenghuiCheng force-pushed the penghuic/scatter_add_deterministic branch from fc26d80 to 1b26d16 Compare November 11, 2024 02:31
@EikanWang EikanWang changed the title [WIP] avoid atomic add for XPU device in satter_add by deterministic mode [Intel GPU] Avoid atomic add for XPU device in satter_add by deterministic mode Nov 11, 2024
@EikanWang EikanWang requested a review from malfet November 11, 2024 07:08
@EikanWang EikanWang requested a review from atalman November 11, 2024 07:08
@guangyey guangyey requested a review from ezyang November 12, 2024 06:13
@guangyey guangyey added this to the 2.6.0 milestone Nov 12, 2024
@ezyang
Copy link
Contributor

ezyang commented Nov 13, 2024

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 13, 2024
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks Merged open source topic: not user facing topic category

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants