SWDEV-292618 - Enable/Fix more dtests on Nvidia Platform
Change-Id: I0fdac4ddefa693674dfce66ba29306f34ad886c9
Этот коммит содержится в:
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD: %t %s
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD: %t %s
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD: %t %s ../../test_common.cpp
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -504,8 +504,10 @@ int main() {
|
||||
test_passed(TestOnMultiGPUwithOneStream);
|
||||
tests.TestkindDtoD();
|
||||
test_passed(TestkindDtoD);
|
||||
#ifndef __HIP_PLATFORM_NVIDIA__
|
||||
tests.TestkindDefaultForDtoD();
|
||||
test_passed(TestkindDefaultForDtoD);
|
||||
#endif
|
||||
tests.TestkindHtoH();
|
||||
test_passed(TestkindsHtoH);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -53,7 +53,9 @@ enum class ops
|
||||
TestkindDtoD,
|
||||
TestkindHtoH,
|
||||
TestkindDefault,
|
||||
#ifndef __HIP_PLATFORM_NVIDIA__
|
||||
TestkindDefaultForDtoD,
|
||||
#endif
|
||||
TestDtoDonSameDevice,
|
||||
END_OF_LIST
|
||||
};
|
||||
@@ -601,9 +603,11 @@ void HipMemcpyWithStreamMultiThreadtests::TestwithMultiThreaded(ops op) {
|
||||
case ops::TestkindDefault:
|
||||
TestkindDefault();
|
||||
break;
|
||||
#ifndef __HIP_PLATFORM_NVIDIA__
|
||||
case ops::TestkindDefaultForDtoD:
|
||||
TestkindDefaultForDtoD();
|
||||
break;
|
||||
#endif
|
||||
case ops::TestDtoDonSameDevice:
|
||||
TestDtoDonSameDevice();
|
||||
break;
|
||||
@@ -648,10 +652,12 @@ int main() {
|
||||
test_passed(HipMemcpyWithStreamMultiThreadtests
|
||||
::TestkindDefault);
|
||||
break;
|
||||
#ifndef __HIP_PLATFORM_NVIDIA__
|
||||
case ops::TestkindDefaultForDtoD:
|
||||
test_passed(HipMemcpyWithStreamMultiThreadtests
|
||||
::TestkindDefaultForDtoD);
|
||||
break;
|
||||
#endif
|
||||
case ops::TestDtoDonSameDevice:
|
||||
test_passed(HipMemcpyWithStreamMultiThreadtests
|
||||
::TestDtoDonSameDevice);
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: managed_kernel.code %hc --genco %S/managed_kernel.cpp -o managed_kernel.code EXCLUDE_HIP_PLATFORM amd
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_PLATFORM amd
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -42,6 +42,10 @@ bool managedMultiGPUTest() {
|
||||
hipGetDeviceCount(&numDevices);
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
hipSetDevice(i);
|
||||
hipDevice_t device;
|
||||
hipCtx_t context;
|
||||
hipDeviceGet(&device, i);
|
||||
hipCtxCreate(&context, 0, device);
|
||||
hipModule_t Module;
|
||||
HIPCHECK(hipModuleLoad(&Module, fileName));
|
||||
hipFunction_t Function;
|
||||
@@ -52,9 +56,11 @@ bool managedMultiGPUTest() {
|
||||
HIPCHECK(hipMemcpyDtoH(&data, hipDeviceptr_t(x), xSize));
|
||||
if (data != (1 + MANAGED_VAR_INIT_VALUE)) {
|
||||
HIPCHECK(hipModuleUnload(Module));
|
||||
hipCtxDestroy(context);
|
||||
return false;
|
||||
}
|
||||
HIPCHECK(hipModuleUnload(Module));
|
||||
hipCtxDestroy(context);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_RUNTIME rocclr EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -131,7 +131,13 @@ void run_multi_threads(uint32_t n, const std::vector<char>& buffer) {
|
||||
int main() {
|
||||
HIPCHECK(hipInit(0));
|
||||
auto buffer = load_file();
|
||||
run_multi_threads(getThreadCount(), buffer);
|
||||
auto file_size = buffer.size() / (1024 * 1024);
|
||||
auto thread_count = getHostThreadCount(file_size + 10);
|
||||
if(thread_count == 0) {
|
||||
failed("Thread Count is zero");
|
||||
}
|
||||
|
||||
run_multi_threads(thread_count, buffer);
|
||||
|
||||
passed();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* BUILD: %t %s ../test_common.cpp
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -85,7 +85,11 @@ void runTest(int width,int height,int depth,texture<T, hipTextureType3D, hipRead
|
||||
myparms.srcPtr = make_hipPitchedPtr(hData, width * sizeof(T), width, height);
|
||||
myparms.dstArray = arr;
|
||||
myparms.extent = make_hipExtent(width, height, depth);
|
||||
#ifdef __HIP_PLATFORM_NVIDIA__
|
||||
myparms.kind = cudaMemcpyHostToDevice;
|
||||
#else
|
||||
myparms.kind = hipMemcpyHostToDevice;
|
||||
#endif
|
||||
HIPCHECK(hipMemcpy3D(&myparms));
|
||||
|
||||
// set texture parameters
|
||||
|
||||
Ссылка в новой задаче
Block a user