Fix hipGetDeviceAttribute dtest for HIP/NVCC
[ROCm/hip commit: 0782c52271]
Dieser Commit ist enthalten in:
@@ -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;
|
||||
}
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren