automate gcnarch detection
Change-Id: Ibbad22db136f7f5e2be84c82e9169298a144cc77
[ROCm/hip commit: 3e610ab0fe]
This commit is contained in:
@@ -737,21 +737,7 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop)
|
||||
char archName[256];
|
||||
err = hsa_agent_get_info(_hsaAgent, HSA_AGENT_INFO_NAME, &archName);
|
||||
|
||||
if(strcmp(archName,"gfx701")==0){
|
||||
prop->gcnArch = 701;
|
||||
}
|
||||
if(strcmp(archName,"gfx801")==0){
|
||||
prop->gcnArch = 801;
|
||||
}
|
||||
if(strcmp(archName,"gfx802")==0){
|
||||
prop->gcnArch = 802;
|
||||
}
|
||||
if(strcmp(archName,"gfx803")==0){
|
||||
prop->gcnArch = 803;
|
||||
}
|
||||
if(strcmp(archName,"gfx900")==0){
|
||||
prop->gcnArch = 900;
|
||||
}
|
||||
prop->gcnArch = atoi(archName+3);
|
||||
|
||||
DeviceErrorCheck(err);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user