Skip to content

[SYCL] Fix warning in integration header about empty array. #4490

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 4 commits into from
Sep 7, 2021

Conversation

erichkeane
Copy link
Contributor

The kernel_signatures array represents the list of fields for the
kernels. When no kernel has a field, this causes a warning about the
array being empty.

This patch adds a 'dummy' value at the end of the array that serves 2
purposes:
1- to suppress this warning.
2- to be obvious when the runtime ends up 1 past the end of the valid
array.

The kernel_signatures array represents the list of fields for the
kernels. When no kernel has a field, this causes a warning about the
array being empty.

This patch adds a 'dummy' value at the end of the array that serves 2
purposes:
1- to suppress this warning.
2- to be obvious when the runtime ends up 1 past the end of the valid
array.
premanandrao
premanandrao previously approved these changes Sep 3, 2021
Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

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

Minor typo, but otherwise looks good.

@@ -0,0 +1,26 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -fsycl-int-header=%t.h %s -fsyntax-only
// RUN: FileCheck -input-file=%t.h %s
// This testv validates that we don't generate an empty 'kernel_signatures' in
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// This testv validates that we don't generate an empty 'kernel_signatures' in
// This test validates that we don't generate an empty 'kernel_signatures' in

Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM!

@dm-vodopyanov dm-vodopyanov merged commit 26184e2 into intel:sycl Sep 7, 2021
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

Successfully merging this pull request may close these issues.

5 participants