2016-10-04 22:20:50 +05:30
|
|
|
#include "hip/hip_runtime.h"
|
|
|
|
|
#include "hip/hip_runtime_api.h"
|
2016-09-27 13:33:42 -05:00
|
|
|
#include"hipDeviceUtil.h"
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
int pi;
|
|
|
|
|
int attr = 0;
|
|
|
|
|
// hipDeviceAttribute_t attr = hipDeviceAttributeMaxThreadsPerBlock;
|
2016-11-21 13:53:28 -06:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(NULL, hipDeviceAttribute_t(attr), 0), hipDeviceGetAttribute);
|
2016-09-27 13:33:42 -05:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(&pi, hipDeviceAttribute_t(attr), 0), hipDeviceGetAttribute);
|
|
|
|
|
attr = -1;
|
2016-11-21 13:53:28 -06:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(NULL, hipDeviceAttribute_t(attr), 0), hipDeviceGetAttribute);
|
2016-09-27 13:33:42 -05:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(&pi, hipDeviceAttribute_t(attr), 0), hipDeviceGetAttribute);
|
|
|
|
|
attr = 0;
|
2016-11-21 13:53:28 -06:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(NULL, hipDeviceAttribute_t(attr), -1), hipDeviceGetAttribute);
|
2016-09-27 13:33:42 -05:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(&pi, hipDeviceAttribute_t(attr), -1), hipDeviceGetAttribute);
|
|
|
|
|
attr = -1;
|
2016-11-21 13:53:28 -06:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(NULL, hipDeviceAttribute_t(attr), -1), hipDeviceGetAttribute);
|
2016-09-27 13:33:42 -05:00
|
|
|
HIP_CHECK(hipDeviceGetAttribute(&pi, hipDeviceAttribute_t(attr), -1), hipDeviceGetAttribute);
|
|
|
|
|
}
|