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

hipLaunchKernelGGL can launch kernel multiple times #542

Closed
jszuppe opened this issue Jun 28, 2018 · 2 comments
Closed

hipLaunchKernelGGL can launch kernel multiple times #542

jszuppe opened this issue Jun 28, 2018 · 2 comments
Assignees

Comments

@jszuppe
Copy link

jszuppe commented Jun 28, 2018

hipLaunchKernelGGL can launch the same kernel multiple times. Example: multiple_kernel_runs.zip

When the situation occurs:

  1. There is a header library bar with bar::bar_impl() function that launches a kernel.
  2. bar::bar_impl is used in another header library foo to implement FooClass::foo().
  3. There is dynamic lib foobar with foobar() func which calls FooClass::foo() function.
  4. Main application both uses foobar() and directly FooClass::foo(). Only one call to those functions launches the kernel. In that call instead of one launch, kernel is run twice.

We suspect that probably in here should be a break after hipModuleLaunchKernel().

See ROCm/rocPRIM#13

@AlexVlx AlexVlx self-assigned this Jun 28, 2018
@AlexVlx
Copy link
Contributor

AlexVlx commented Jun 28, 2018

Thank you for reporting this (and for providing a repro); orthogonally to this issue, the current code has a logical issue (my fault) in that it'd needlessly iterate through the vector even after having found a valid kernel.

@mangupta
Copy link
Contributor

#575 has been merged. Closing this issue.

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

3 participants