Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove atomic emulation #1103

Merged
merged 4 commits into from
Aug 2, 2023
Merged

Remove atomic emulation #1103

merged 4 commits into from
Aug 2, 2023

Conversation

ZzEeKkAa
Copy link
Collaborator

@ZzEeKkAa ZzEeKkAa commented Jul 26, 2023

Since DPCPP now supports atomics, we don't need to emulate them by ourselves.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?

Fixes: #760
Fixes: #650
Fixes: #868
Fixes: #1068

@ZzEeKkAa ZzEeKkAa requested a review from diptorupd July 26, 2023 17:37
@ZzEeKkAa ZzEeKkAa self-assigned this Jul 26, 2023
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_atomic_emulation branch from dc1d1c1 to e8253e2 Compare July 26, 2023 19:08
@diptorupd diptorupd force-pushed the feature/remove_atomic_emulation branch from e8253e2 to e751744 Compare July 26, 2023 20:45
@diptorupd diptorupd marked this pull request as ready for review July 26, 2023 20:45
@diptorupd diptorupd marked this pull request as draft July 26, 2023 20:45
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_atomic_emulation branch from e751744 to 743de4b Compare July 26, 2023 22:13
numba_dpex/ocl/oclimpl.py Outdated Show resolved Hide resolved
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_atomic_emulation branch 4 times, most recently from 5eb17ca to f323f73 Compare July 31, 2023 16:02
@ZzEeKkAa ZzEeKkAa changed the title WIP: Remove atomic emulation Remove atomic emulation Jul 31, 2023
@ZzEeKkAa ZzEeKkAa marked this pull request as ready for review July 31, 2023 16:03
@ZzEeKkAa
Copy link
Collaborator Author

This PR should unblock these checks:
IntelPython/dpbench#289

@ZzEeKkAa ZzEeKkAa requested a review from diptorupd July 31, 2023 16:38
Copy link
Collaborator

@diptorupd diptorupd left a comment

Choose a reason for hiding this comment

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

The run_test.sh script in the conda-recipe directory should be updated as well.

The documentation page
https://github.com/IntelPython/numba-dpex/blob/main/docs/source/user_guide/kernel_programming/atomic-operations.rst should be updated as well.

Please test #1068, #774, #711 as well with this PR.

@diptorupd
Copy link
Collaborator

@ZzEeKkAa in a subsequent PR can you push changes to remove the dependency on spirv-tools?

@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_atomic_emulation branch from f323f73 to 7d9bcca Compare August 1, 2023 18:11
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Documentation preview: show.

@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_atomic_emulation branch 2 times, most recently from e28ea8b to 0f05392 Compare August 2, 2023 15:18
@ZzEeKkAa
Copy link
Collaborator Author

ZzEeKkAa commented Aug 2, 2023

#650 tested:

> set NUMBA_DPPY_DEBUG=1
> dpbench -b gpairs -i numba_dpex_k run --no-skip-expected-failures

================ Benchmark GPairs (gpairs) ========================

================ implementation numba_dpex_k ========================
implementation: numba_dpex_k
framework: numba_dpex
framework version: 0.21.1+61.g7d9bcca0.dirty
input size: 8512
setup time: 219.6217ms (219621700 ns)
warmup time: 962.5928ms (962592800 ns)
teardown time: 101.4μs (101400 ns)
max execution times: 4.226ms (4226000 ns)
min execution times: 2.7134ms (2713400 ns)
median execution times: 3.15995ms (3159950 ns)
repeats: 10
preset: S
validated: Success

@ZzEeKkAa
Copy link
Collaborator Author

ZzEeKkAa commented Aug 2, 2023

#1068 tested:

python test_1068.py
Using device ...
Device(level_zero:gpu:0)
Reduction sum = 11.
Done...

@ZzEeKkAa
Copy link
Collaborator Author

ZzEeKkAa commented Aug 2, 2023

This change is ready to go. I've tested all the mentioned issues.

These issues simply does not make sense now: #760, #868, #711 does not work, see my latest comment there.

@ZzEeKkAa ZzEeKkAa enabled auto-merge August 2, 2023 17:37
@ZzEeKkAa ZzEeKkAa merged commit ead772d into main Aug 2, 2023
24 checks passed
@ZzEeKkAa ZzEeKkAa deleted the feature/remove_atomic_emulation branch August 2, 2023 17:37
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

Documentation preview removed.

@ZzEeKkAa
Copy link
Collaborator Author

ZzEeKkAa commented Aug 2, 2023

@ZzEeKkAa in a subsequent PR can you push changes to remove the dependency on spirv-tools?

Did it here in a separate commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants