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

apply environment variable CL_PLATFORM_INDEX to test_compute_info #1851

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Phy02223
Copy link

The environment variable CL_PLATFORM_INDEX was meant to be used to specify the platform on which the conformance test should be run, but the compute_info test does not properly utilize this particular environment variable, which might cause unexpected test failure in a multi-platform environment.
Previously in the test_compute_info function, the first clGetPlatformIDs call just passed constant value 1 as the first argument, which would only be able to get the ID of the first platform, regardless of the CL_PLATFORM_INDEX setting.
After the change, it would first be checked whether the CL_PLATFORM_INDEX is a valid platform index, and falls back to use the first platform if no environment variable is provided.
Similar function has already be implemented in the source file testHarness.cpp, but the current test_compute_info function lacks appropriate support for platform selection through the enviroment variable.

Add support for selecting platform in compute_info test through environment variable setting.
@CLAassistant
Copy link

CLAassistant commented Nov 24, 2023

CLA assistant check
All committers have signed the CLA.

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.

2 participants