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

memory access fault when linking dynamic lib that uses hipcub #13

Closed
ntrost57 opened this issue Jun 28, 2018 · 7 comments
Closed

memory access fault when linking dynamic lib that uses hipcub #13

ntrost57 opened this issue Jun 28, 2018 · 7 comments

Comments

@ntrost57
Copy link

ntrost57 commented Jun 28, 2018

I am running into a memory access fault when linking to a dynamic library that uses hipcub if I use hipcub also in the main program (that links to the package that uses hipcub).
Please see the following minimal example hipcub_test.tar.gz

Edit: This does not happen when using rocprim or cub instead of hipcub.

@jszuppe
Copy link
Contributor

jszuppe commented Jun 28, 2018

I'll look into it.

@jszuppe
Copy link
Contributor

jszuppe commented Jun 28, 2018

Does the same thing happen with rocPRIM?

@ntrost57
Copy link
Author

No, does not happen with rocPRIM.

@jszuppe
Copy link
Contributor

jszuppe commented Jun 28, 2018

We identified the problem: for some reasons in said configuration (linking to a dynamic library that uses hipcub if I use hipcub also in the main program) every kernel is run twice by HIP framework. Some kernels are resistant to that, some are not (access errors). We are not sure why it happens only for hipCUB.

Right now we are thinking that probably in here should be a break after hipModuleLaunchKernel().

@jszuppe
Copy link
Contributor

jszuppe commented Jun 28, 2018

Here are HIP API traces for correct and incorrect (with bug) execution, where we can clearly the difference.

bug_hiptrace.txt
correct_hiptrace.txt

@jszuppe
Copy link
Contributor

jszuppe commented Jun 28, 2018

I guess we should open issue in HIP repo.

@jszuppe
Copy link
Contributor

jszuppe commented Jul 18, 2018

Should be fixed by ROCm/HIP#575. I don't know which ROCm release will include that.

@jszuppe jszuppe closed this as completed Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants