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

Local variables (shared in CUDA) don't always work #4

Open
AuroraPerego opened this issue Nov 22, 2022 · 0 comments
Open

Local variables (shared in CUDA) don't always work #4

AuroraPerego opened this issue Nov 22, 2022 · 0 comments

Comments

@AuroraPerego
Copy link
Owner

In two places the accessors didn't work as expected. It seems that their value is not updated when we do some operations on them unless we print them afterward.

To reproduce the first error (tested with dpcpp 2022.1.0):

git clone -b Aurora [email protected]:AuroraPerego/pixeltrack-standalone.git
cd pixeltrack-standalone
# change the ONEAPI base
make environment
source env.sh
make -j `nproc` sycl

Then follow the instructions in the reproducer.md

To reproduce the second error (on NVIDIA GPU):

git clone -b dev [email protected]:AuroraPerego/pixeltrack-standalone.git
cd pixeltrack-standalone
git reset --hard 0ecfbdbf3877c24ff8ee640e1edf7ca9a806d3cd
// change LLVM_BASE in the Makefile and set USE_SYCL_LLVM := true 
make environment
source env.sh
make -j `nproc` sycl
./sycl --device cuda --maxEvents 1

Printing *ibs (a local variable) at line 200 of src/sycl/SYCLCore/radixSort.h fixes the segmentation fault
It looks like *ibs value is not updated unless explicitly used, declaring it volatile does not solve the issue and tracks with similar issues found in other parts of the project.

The solution for now has been to get rid of local variables and use private memory instead.

Note: if the code doesn't compile due to an unexpected intrinsic comment line 155 of src/sycl/plugin-PixelVertexFinding/gpuClusterTracksIterative.h

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

No branches or pull requests

1 participant