fix hipVectorTypesDevice direct test with GGL enabled
Change-Id: I7a63b87348f08f094cd709e87397d9e0fc24e4c2
[ROCm/hip commit: c865151e50]
Ta zmiana jest zawarta w:
%! (template.HTML=
Sun, Peng)złożyło 2017-03-30 17:14:55 -05:00
1 rodzic
a68e89d29b
złożenie
39550b0f4c
Plik 1 zmieniony
+18
-3
@@ -3874,7 +3874,22 @@ int main() {
|
||||
assert(sizeof(float2) == 8);
|
||||
assert(sizeof(float3) == 12);
|
||||
assert(sizeof(float4) == 16);
|
||||
bool *ptr;
|
||||
hipLaunchKernel(CheckVectorTypes, dim3(1,1,1), dim3(1,1,1), 0, 0, ptr);
|
||||
passed();
|
||||
|
||||
bool* ptr = nullptr;
|
||||
if (hipMalloc(&ptr, sizeof(bool)) != HIP_SUCCESS) return EXIT_FAILURE;
|
||||
std::unique_ptr<bool, decltype(hipFree)*> correct{ptr, hipFree};
|
||||
hipLaunchKernel(
|
||||
CheckVectorTypes, dim3(1,1,1), dim3(1,1,1), 0, 0, correct.get());
|
||||
bool passed = false;
|
||||
if (hipMemcpyDtoH(&passed, correct.get(), sizeof(bool)) != HIP_SUCCESS) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (passed == true){
|
||||
std::cout << "PASSED" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika