Skip to content
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

[SYCL] Replace acc with 'fpga' in tests using ONEAPI_DEVICE_SELECTOR #12551

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Jan 30, 2024

As per the ONEAPI_DEVICE_SELECTOR documentation, the device type can only be cpu, gpu, or fpga (or any combination of those). Currently, 'acc' is also accepted by ONEAPI_DEVICE_SELECTOR as a valid device type, which is incorrect.

This PR modifies existing test cases to use 'fpga' instead of 'acc' in ONEAPI_DEVICE_SELECTOR.
In future, we will completely drop 'acc' from device type in ONEAPI_DEVICE_SELECTOR.

Partially addresses: #12387

@uditagarwal97 uditagarwal97 self-assigned this Jan 30, 2024
Copy link
Contributor

github-actions bot commented Jan 30, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@@ -15,7 +15,7 @@
ONEAPI_DEVICE_SELECTOR=level_zero:gpu ./binx.bin
ONEAPI_DEVICE_SELECTOR=opencl:cpu ./binx.bin

ONEAPI_DEVICE_SELECTOR=opecl:acc ../binx.bin <-- does not support image
ONEAPI_DEVICE_SELECTOR=opencl:fpga ../binx.bin <-- does not support image
Copy link
Contributor

Choose a reason for hiding this comment

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

accelerator is what our OpenCL plugin reports and also what we document in the oneapi-construction-kit i how to use with dpc++ - are you saying that "fpga" will map onto this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per the ONEAPI_DEVICE_SELECTOR documentation, the device type can only be cpu, gpu, or fpga (or any combination of those). Currently, 'acc' is also accepted by ONEAPI_DEVICE_SELECTOR as a valid device type, which is incorrect.
Therefore, I'm changing test cases and documentation, that uses ONEAPI_DEVICE_SELECTOR with 'acc' device type to instead use 'fpga'. Functionality wise, 'acc' and 'fpga' device types are equivalent so this change should not change the functionality of the test cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know about the test cases, I just wanted to be sure we can put fpga when the opencl device says accelerator.

@uditagarwal97 uditagarwal97 marked this pull request as ready for review January 31, 2024 21:39
@uditagarwal97 uditagarwal97 requested a review from a team as a code owner January 31, 2024 21:39
@uditagarwal97 uditagarwal97 changed the title [DRAFT][SYCL] Remove acc from device type in ONEAPI_DEVICE_SELECTOR [SYCL] Remove acc from device type in ONEAPI_DEVICE_SELECTOR Jan 31, 2024
Will do it in a seperate PR
@uditagarwal97 uditagarwal97 changed the title [SYCL] Remove acc from device type in ONEAPI_DEVICE_SELECTOR [SYCL] Replace acc with 'fpga' in tests using ONEAPI_DEVICE_SELECTOR Feb 2, 2024
@uditagarwal97
Copy link
Contributor Author

@aelovikov-intel I have modified this PR to only make changes in the existing tests. I will make another PR to drop 'acc' support.

@uditagarwal97
Copy link
Contributor Author

@intel/llvm-gatekeepers the PR is ready.

@steffenlarsen steffenlarsen merged commit e94b247 into intel:sycl Feb 5, 2024
12 checks passed
MaryaSharf added a commit to MaryaSharf/oneapi-construction-kit that referenced this pull request Feb 6, 2024
MaryaSharf added a commit to MaryaSharf/oneapi-construction-kit that referenced this pull request Feb 6, 2024
MaryaSharf added a commit to MaryaSharf/oneapi-construction-kit that referenced this pull request Feb 6, 2024
MaryaSharf added a commit to MaryaSharf/oneapi-construction-kit that referenced this pull request Feb 6, 2024
dm-vodopyanov pushed a commit that referenced this pull request Feb 8, 2024
)

As per the ONEAPI_DEVICE_SELECTOR
[documentation](https://github.com/intel/llvm/blob/sycl/sycl/doc/EnvironmentVariables.md#oneapi_device_selector),
the device type can only be cpu, gpu, or fpga (or any combination of
those). Currently, 'acc' is also accepted by ONEAPI_DEVICE_SELECTOR as a
valid device type, which is incorrect.

This PR modifies drops support of 'acc' in ONEAPI_DEVICE_SELECTOR in
favor of 'fpga'. We have already updated existing test cases (#12551),
testing scripts (#12596 ) to use 'fpga' with ONEAPI_DEVICE_SELECTOR.
@uditagarwal97 uditagarwal97 deleted the remove_acc_ods branch March 21, 2024 19:58
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.

4 participants