kDeviceName = 5,
kMaxClockRate = 6,
kMultiProcessorCount = 7,
- kMaxThreadDimensions = 8
+ kMaxThreadDimensions = 8,
+ kGcnArch = 9
};
/*! \brief Number of bytes each allocation must align to */
TVMRetValue val;
api->GetAttr(tvm_ctx, tvm::runtime::kExist, &val);
if (val.operator int() == 1) {
- tvm::runtime::DeviceAPI::Get(tvm_ctx)->GetAttr(tvm_ctx, tvm::runtime::kComputeVersion, &val);
+ tvm::runtime::DeviceAPI::Get(tvm_ctx)->GetAttr(tvm_ctx, tvm::runtime::kGcnArch, &val);
return val.operator int();
}
}
#include <dmlc/logging.h>
#include <dmlc/thread_local.h>
-#include <tvm/runtime/registry.h>
#include <hip/hip_runtime_api.h>
#include <hsa/hsa.h>
+#include <tvm/runtime/registry.h>
+#include "../../../include/tvm/runtime/device_api.h"
#include "rocm_common.h"
namespace tvm {
break;
}
case kMaxSharedMemoryPerBlock: return;
- case kComputeVersion: {
+ case kComputeVersion:
+ case kDeviceName: return;
+ case kMaxClockRate: return;
+ case kMultiProcessorCount: return;
+ case kMaxThreadDimensions: return;
+ case kGcnArch: {
hipDeviceProp_t prop;
ROCM_CALL(hipGetDeviceProperties(&prop, ctx.device_id));
*rv = prop.gcnArch;
return;
}
- case kDeviceName: return;
- case kMaxClockRate: return;
- case kMultiProcessorCount: return;
- case kMaxThreadDimensions: return;
}
*rv = value;
}