Skip to content

Conversation

@bjoernknafla
Copy link

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
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
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