-
Notifications
You must be signed in to change notification settings - Fork 33
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
Implementations for atomic load, store and exchange operations #1297
Conversation
8ead4e8
to
5a3a087
Compare
numba_dpex/tests/experimental/kernel_iface/spv_overloads/test_atomic_cmp_exchg.py
Outdated
Show resolved
Hide resolved
numba_dpex/experimental/_kernel_dpcpp_spirv_overloads/_atomic_ref_overloads.py
Outdated
Show resolved
Hide resolved
@adarshyoga the crash is reproducible if you use I ran it with gdb and here is the backtrace: 0x00007ffff5f325f5 in std::_Function_handler<void (sycl::_V1::handler&), DPCTLQueue_SubmitRange::{lambda(sycl::_V1::handler&)#1}>::_M_invoke(std::_Any_data const&, sycl::_V1::handler&) ()
from /home/diptorupd/miniconda3/envs/dpex-devel/lib/python3.11/site-packages/dpctl/libDPCTLSyclInterface.so.0
(gdb) bt
#0 0x00007ffff5f325f5 in std::_Function_handler<void (sycl::_V1::handler&), DPCTLQueue_SubmitRange::{lambda(sycl::_V1::handler&)#1}>::_M_invoke(std::_Any_data const&, sycl::_V1::handler&) ()
from /home/diptorupd/miniconda3/envs/dpex-devel/lib/python3.11/site-packages/dpctl/libDPCTLSyclInterface.so.0
#1 0x00007ffff5b0ce36 in sycl::_V1::detail::queue_impl::submit_impl(std::function<void (sycl::_V1::handler&)> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, sycl::_V1::detail::code_location const&, std::function<void (bool, bool, sycl::_V1::event&)> const*)
() from /home/diptorupd/miniconda3/envs/dpex-devel/lib/python3.11/site-packages/dpctl/../../../libsycl.so.6
#2 0x00007ffff5b0c406 in sycl::_V1::detail::queue_impl::submit(std::function<void (sycl::_V1::handler&)> const&, std::shared_ptr<sycl::_V1::detail::queue_impl> const&, sycl::_V1::detail::code_location const&, std::function<void (bool, bool, sycl::_V1::event&)> const*) () from /home/diptorupd/miniconda3/envs/dpex-devel/lib/python3.11/site-packages/dpctl/../../../libsycl.so.6
#3 0x00007ffff5b0c3c5 in sycl::_V1::queue::submit_impl(std::function<void (sycl::_V1::handler&)>, sycl::_V1::detail::code_location const&) ()
from /home/diptorupd/miniconda3/envs/dpex-devel/lib/python3.11/site-packages/dpctl/../../../libsycl.so.6
#4 0x00007ffff5f2e6bc in DPCTLQueue_SubmitRange () from /home/diptorupd/miniconda3/envs/dpex-devel/lib/python3.11/site-packages/dpctl/libDPCTLSyclInterface.so.0
#5 0x00007fffa75861fd in numba_dpex::experimental::launcher::call_kernel[abi:v16][abi:c8tJTC_2fWQAlzW1yBDkop6GEOEUMEOYSPGuIQMViAQ3iQ8IbKQIMbwoOGNoQDDWwQR1NHAS3lQ9XgSucwm4pgLNTQs00pSK3QBAA_3d](type_28KernelDispatcher_28_3cfunction_20test_load_store_fn::_3clocals_3e::_kernel_20at_200x7fff4613ba60_3e_29_29, Range_3c1_3e, UniTuple<DpnpNdArray<double, 1, C, opencl_cpu>, 2>) ()
#6 0x00007fffa75866ca in cpython::numba_dpex::experimental::launcher::call_kernel[abi:v16][abi:c8tJTC_2fWQAlzW1yBDkop6GEOEUMEOYSPGuIQMViAQ3iQ8IbKQIMbwoOGNoQDDWwQR1NHAS3lQ9XgSucwm4pgLNTQs00pSK3QBAA_3d](type_28KernelDispatcher_28_3cfunction_20test_load_store_fn::_3clocals_3e::_kernel_20at_200x7fff4613ba60_3e_29_29, Range_3c1_3e, UniTuple<DpnpNdArray<double, 1, C, opencl_cpu>, 2>) ()
#7 0x00007ffff357da25 in compile_and_invoke(Dispatcher*, _object*, _object*, _object*) () |
Thats great! Thanks for fixing this and adding the license. Also, is there anything more needed for this PR? Do the two commits need to be squashed? |
f23f358
to
a1148f1
Compare
- Removes the helper function for intrinsic codegen for atomic store and atomic exchange. - Adds a new module that has helper functions for inserting the LLVM IR module-level declaration for individual SPV functions.
ae7d68e
to
988ee51
Compare
numba_dpex/tests/experimental/kernel_iface/spv_overloads/test_atomic_load_store.py
Outdated
Show resolved
Hide resolved
988ee51
to
fb916a2
Compare
Implementations for atomic load, store and exchange operations f59d9e8
…str_excg_ols Implementations for atomic load, store and exchange operations f59d9e8
This PR adds overloads and intrinsics for load, store and exchange atomic operations. It also contains unit tests that verify the functionality and the failure cases for these operations.