Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Remove atomic emulation#1103

Merged
ZzEeKkAa merged 4 commits into
mainfrom
feature/remove_atomic_emulation
Aug 2, 2023
Merged

Remove atomic emulation#1103
ZzEeKkAa merged 4 commits into
mainfrom
feature/remove_atomic_emulation

Conversation

@ZzEeKkAa

@ZzEeKkAa ZzEeKkAa commented Jul 26, 2023

Copy link
Copy Markdown
Contributor

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
Comment thread numba_dpex/ocl/oclimpl.py Outdated
@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
Comment thread numba_dpex/ocl/oclimpl.py Outdated
@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
Copy Markdown
Contributor Author

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

@ZzEeKkAa
ZzEeKkAa requested a review from diptorupd July 31, 2023 16:38
Comment thread numba_dpex/examples/kernel/atomic_op.py
Comment thread numba_dpex/ocl/oclimpl.py

@diptorupd diptorupd left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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

github-actions Bot commented Aug 1, 2023

Copy link
Copy Markdown
Contributor

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

ZzEeKkAa commented Aug 2, 2023

Copy link
Copy Markdown
Contributor Author

#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

ZzEeKkAa commented Aug 2, 2023

Copy link
Copy Markdown
Contributor Author

#1068 tested:

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

@ZzEeKkAa

ZzEeKkAa commented Aug 2, 2023

Copy link
Copy Markdown
Contributor Author

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 dismissed diptorupd’s stale review August 2, 2023 17:37

Changes applied

@ZzEeKkAa
ZzEeKkAa merged commit ead772d into main Aug 2, 2023
@ZzEeKkAa
ZzEeKkAa deleted the feature/remove_atomic_emulation branch August 2, 2023 17:37
@github-actions

github-actions Bot commented Aug 2, 2023

Copy link
Copy Markdown
Contributor

Documentation preview removed.

@ZzEeKkAa

ZzEeKkAa commented Aug 2, 2023

Copy link
Copy Markdown
Contributor Author

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

2 participants