Migrating to SYCL
One-stop forum for getting assistance migrating your existing code to SYCL
39 Discussions

I encountered a problem when i try to use “ dpct::atomic_compare_exchange_strong” function

lisashi
Employee
1,279 Views

I try to use this function “ dpct::atomic_compare_exchange_strong” .  and then I try to run pybind11 and python demo. Then I encountered this problem “Segmentation fault (core dumped)”. Do you have some suggestions to solve this problem.

 

 

This is dpct::atomic_compare_exchange_strong function

 

        uint64_t prev = dpct::atomic_compare_exchange_strong<

            unsigned long long, sycl::access::address_space::generic_space>(

            (unsigned long long *)&p.evHash[idx.get()], (unsigned long long)0,

            (unsigned long long)key);

 

 

This function is converted form https://github.com/NVlabs/nvdiffrast/blob/main/nvdiffrast/common/antialias.cu

Dpct convert this file successfully

 

Best

Lisa Shi

0 Kudos
1 Solution
lisashi
Employee
1,264 Views

i have found out this is a problem about cpu tensor and cuda tensor.  I should  make cpu tensor  in python program to call the dpct::atomic_compare_exchange_strong function

View solution in original post

0 Kudos
2 Replies
lisashi
Employee
1,265 Views

i have found out this is a problem about cpu tensor and cuda tensor.  I should  make cpu tensor  in python program to call the dpct::atomic_compare_exchange_strong function

0 Kudos
ShwethaS_Intel
Moderator
1,152 Views

Hi,

Thanks for reaching out to us. Glad to know that your issue is resolved. If you need any further assistance, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Shwetha



0 Kudos
Reply