SWDEV-292618 - Enable/Fix more dtests on Nvidia Platform
Change-Id: I0fdac4ddefa693674dfce66ba29306f34ad886c9
[ROCm/hip commit: f5703d57cd]
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user