mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +00:00
SPIR-V handling on different OpenCL devices version
Example usage for bruteforce and spirv_new
This commit is contained in:
committed by
Alastair Murray
parent
d643dc5399
commit
3730bce4e8
@@ -163,17 +163,24 @@ int get_program_with_il(clProgramWrapper &prog,
|
||||
return err;
|
||||
}
|
||||
|
||||
test_status checkAddressWidth(cl_device_id id)
|
||||
test_status InitCL(cl_device_id id)
|
||||
{
|
||||
cl_uint address_bits;
|
||||
cl_uint err = clGetDeviceInfo(id, CL_DEVICE_ADDRESS_BITS, sizeof(cl_uint), &address_bits, NULL);
|
||||
if(err != CL_SUCCESS){
|
||||
test_status spirv_status;
|
||||
bool force = true;
|
||||
spirv_status = check_spirv_compilation_readiness(id, force);
|
||||
if (spirv_status != TEST_PASS) {
|
||||
return spirv_status;
|
||||
}
|
||||
|
||||
cl_uint address_bits;
|
||||
cl_uint err = clGetDeviceInfo(id, CL_DEVICE_ADDRESS_BITS, sizeof(cl_uint), &address_bits, NULL);
|
||||
if(err != CL_SUCCESS){
|
||||
log_error("clGetDeviceInfo failed to get address bits!");
|
||||
return TEST_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
gAddrWidth = address_bits == 32 ? "32" : "64";
|
||||
return TEST_PASS;
|
||||
gAddrWidth = address_bits == 32 ? "32" : "64";
|
||||
return TEST_PASS;
|
||||
}
|
||||
|
||||
void printUsage() {
|
||||
@@ -213,5 +220,5 @@ int main(int argc, const char *argv[])
|
||||
return runTestHarnessWithCheck(argc, argv,
|
||||
spirvTestsRegistry::getInstance().getNumTests(),
|
||||
spirvTestsRegistry::getInstance().getTestDefinitions(),
|
||||
false, 0, checkAddressWidth);
|
||||
false, 0, InitCL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user