-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] Indicate lack of direct OpenCL interop when not using OpenCL BE. #1242
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// REQUIRES: opencl | ||
|
||
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL | ||
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out | ||
// RUN: %CPU_RUN_PLACEHOLDER %t.out | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we remove lines 9 and 10? // TODO: Image support in CUDA backend
// XFAIL: cuda There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would not hurt though might be better as an extra PR to not block this one that re-enables LIT testing with CUDA? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm okay to resolve this comment in a separate pull request.
I think all these files should have something like: // REQUIRES: opencl
// UNSUPPORTED: cuda There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I remember correctly @bjoernknafla mentioned that XFAIL: cuda was there to indicate that the test fails for CUDA and needs to be fixed. Have all the TODOs been resolved for ^ tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are requiring OpenCL, so I assume that none of them can be "fixed on CUDA". Am I missing something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// REQUIRES: opencl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume it means that this test is supposed to be skipped if there is no OpenCL support in the system. # PI API either supports OpenCL or CUDA.
opencl = False
if not cuda:
opencl = True
config.available_features.add('opencl') There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current test idea is to either run testing for OpenCL xor CUDA. (My understanding is though that some tests do not go through the SYCL default selector and therefore won't react to the env var - this adds some nondeterminism to which backend they choose). The selection happens as follows:
The Python script for the LIT SYCL tests uses the Therefore, we either set the However, it is always possible to explicitly query for all devices of all backends by not using the default device selector. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have neither OpenCL nor CUDA on my machine. What will happen to my There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to clarify, I expect my tests to run on the host device only, but I'm not sure that tests which explicitly requested OpenCL will be disabled. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. I am not sure how to solve this cleanly right now, e.g., we would want to say that no backend is under test (to express that we test HOST)? What will happen at the moment is:
If I run Testing Time: 158.27s
********************
Failing Tests (5):
SYCL :: kernel_from_file/hw.cpp <- unexpected interaction with CUDA
SYCL :: scheduler/DataMovement.cpp <- unexpected interaction with CUDA
SYCL :: scheduler/MultipleDevices.cpp <- unexpected interaction with CUDA
SYCL :: separate-compile/test.cpp <- unexpected interaction with CUDA
Expected Passes : 201
Unsupported Tests : 17
Unexpected Failures: 5 On a machine without OpenCL and when not building the CUDA backend no failures happen. Something to look into though not in this PR I recon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NOTE: this file already has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bjoernknafla, I'm okay to resolve this separately. I need to go deeper into LIT config file to understand what is the best way to handle it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad, I missed the // REQUIRES: opencl at line 7. Let me check if I've missed any more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the only case. |
||
|
||
// RUN: %clangxx -fsycl %s -o %t.out | ||
// RUN: %CPU_RUN_PLACEHOLDER %t.out | ||
// RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
// RUN: %ACC_RUN_PLACEHOLDER %t.out | ||
// REQUIRES: opencl | ||
// UNSUPPORTED: cuda | ||
//==---------------- opencl-interop.cpp - SYCL linear id test --------------==// | ||
// | ||
|
Uh oh!
There was an error while loading. Please reload this page.