Fix hipGetDeviceAttribute dtest for HIP/NVCC
[ROCm/hip commit: 0782c52271]
Этот коммит содержится в:
@@ -597,6 +597,10 @@ inline static hipError_t hipGetDeviceProperties(hipDeviceProp_t *p_prop, int dev
|
||||
p_prop->arch.hasDynamicParallelism = (ccVers >= 350);
|
||||
|
||||
p_prop->concurrentKernels = cdprop.concurrentKernels;
|
||||
p_prop->pciBusID = cdprop.pciBusID;
|
||||
p_prop->pciDeviceID = cdprop.pciDeviceID;
|
||||
p_prop->maxSharedMemoryPerMultiProcessor = cdprop.sharedMemPerMultiprocessor;
|
||||
p_prop->isMultiGpuBoard = cdprop.isMultiGpuBoard;
|
||||
|
||||
return hipCUDAErrorTohipError(cerror);
|
||||
}
|
||||
|
||||
@@ -39,14 +39,14 @@ THE SOFTWARE.
|
||||
exit(EXIT_FAILURE);\
|
||||
}
|
||||
|
||||
hipError_t test_hipDeviceGetAttribute(int deviceId, hipDeviceAttribute_t attr, int expectedValue = 0)
|
||||
hipError_t test_hipDeviceGetAttribute(int deviceId, hipDeviceAttribute_t attr, int expectedValue = -1)
|
||||
{
|
||||
int value = 0;
|
||||
std::cout << "Test hipDeviceGetAttribute attribute " << attr;
|
||||
if (expectedValue) { std::cout << " expected value " << expectedValue; }
|
||||
if (expectedValue != -1) { std::cout << " expected value " << expectedValue; }
|
||||
hipError_t e = hipDeviceGetAttribute(&value, attr, deviceId);
|
||||
std::cout << " actual value " << value << std::endl;
|
||||
if (expectedValue && value != expectedValue) {
|
||||
if ((expectedValue != -1) && value != expectedValue) {
|
||||
std::cout << "fail" << std::endl;
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user