-
Notifications
You must be signed in to change notification settings - Fork 724
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
[Driver][SYCL] Handle invalid characters from device in temp files #14563
Conversation
When using command lines such as -fsycl -fsycl-targets=spir64_gen --offload-new-driver -Xsycl-target-backend "-device *" there is a temporary file that is generated that contains the arch value. Eliminate any possible invalid characters from being used with this temporary file.
|
||
// RUN: %clang -### --target=x86_64-pc-windows-msvc -fsycl \ | ||
// RUN: -fsycl-targets=spir64_gen --offload-new-driver \ | ||
// RUN: -Xsycl-target-backend "-device arch1:arch2" %s 2>&1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the behavior when the device arch values are comma separated or space separated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strings are not modified. Now, using commas is fine for file names AFAIK, but this could throw a wrench into the arch
settings for the clang-offload-packager
.
@asudarsa, any thoughts on how we can handle comma separated arch values when passed in like -device arch1,arch2,arch3
and is embedded in the clang-offload-packager
image-file stringmap? As the values are comma separated I think it would be parsed incorrectly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srividya-sundaram, I have added some additional changes to convert commas. Additional side discussions to be had with @asudarsa to resolve other issues with the packager.
// RUN: %clangxx -fsycl -### -fsycl-targets=spir64_gen --offload-new-driver \ | ||
// RUN: -Xsycl-target-backend=spir64_gen "-device pvc,bdw" %s 2>&1 \ | ||
// RUN: | FileCheck -check-prefix COMMA_FILE %s | ||
// COMMA_FILE: clang-offload-packager{{.*}} "--image=file={{.*}}pvc@bdw{{.*}},triple=spir64_gen-unknown-unknown,arch=pvc,bdw,kind=sycl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an additional comma here arch=pvc,bdw,
Is this expected or is this the issue you were referring to in your comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of now, it is expected and we will resolve with discussions with Arvind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can create a GitHub issue and link that to this PR.
@intel/llvm-gatekeepers, please take a look - should be ready for merge, thanks! |
…ntel#14563) When using command lines such as -fsycl -fsycl-targets=spir64_gen --offload-new-driver -Xsycl-target-backend "-device *" there is a temporary file that is generated that contains the arch value. Eliminate any possible invalid characters from being used with this temporary file.
When using command lines such as -fsycl -fsycl-targets=spir64_gen --offload-new-driver -Xsycl-target-backend "-device *" there is a temporary file that is generated that contains the arch value. Eliminate any possible invalid characters from being used with this temporary file.