Skip to content

[SYCL][CUDA] Multiple fixes #1299

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

Merged
merged 1 commit into from
Mar 14, 2020
Merged

Conversation

bjoernknafla
Copy link
Contributor

Fix device query for image support.

Fix typo in comment.

Init plugin function table to 0.
As the PI plugin function table can grow without the CUDA plugin being
adapted, set the whole function pointer table to 0 to trigger crashes
on calling functions that are not set.

Signed-off-by: Bjoern Knafla bjoern@codeplay.com

Fix device query for image support.

Fix typo in comment.

Init plugin function table to 0.
As the PI plugin function table can grow without the CUDA plugin being
adapted, set the whole function pointer table to 0 to trigger crashes
on calling functions that are not set.

Signed-off-by: Bjoern Knafla <bjoern@codeplay.com>
@bader bader added the cuda CUDA back-end label Mar 12, 2020
// functions are not set up below.
std::memset(&(PluginInit->PiFunctionTable), 0,
sizeof(PluginInit->PiFunctionTable));

// Forward calls to OpenCL RT.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenCL RT, really? )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjoernknafla, would you like to address this comment before the merge or after?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, it will be addressed by #1241.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and thank you for tracking it being fixed by @fwyzard !

@smaslov-intel
Copy link
Contributor

As the PI plugin function table can grow without the CUDA plugin being
adapted, set the whole function pointer table to 0 to trigger crashes

LGTM, but we should plan using PI version information to detect the out-of-sync

@bader bader merged commit 0d56408 into intel:sycl Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants