Add name for function

[ROCm/clr commit: 5d815937de]
Tá an tiomantas seo le fáil i:
Ben Sander
2016-12-17 08:54:09 -06:00
tuismitheoir c59c82916a
tiomantas 8ab567e331
D'athraigh 2 comhad le 5 breiseanna agus 8 scriosta
@@ -30,7 +30,6 @@ THE SOFTWARE.
#include <stdint.h>
#include <stddef.h>
#include <string>
#include <hip/hcc_detail/host_defines.h>
#include <hip/hip_runtime_api.h>
@@ -76,7 +75,7 @@ struct ihipModuleSymbol_t{
uint64_t _object; // The kernel object.
uint32_t _groupSegmentSize;
uint32_t _privateSegmentSize;
//std::string _name; // TODO - review for performance cost. Name is just used for debug.
char _name[64]; // TODO - review for performance cost. Name is just used for debug.
};
typedef struct ihipModuleSymbol_t hipFunction_t;
+4 -6
Féach ar an gComhad
@@ -243,7 +243,7 @@ hipError_t ihipModuleGetSymbol(hipFunction_t *func, hipModule_t hmod, const char
&func->_privateSegmentSize);
CHECK_HSA(status, hipErrorNotFound);
//func->_name = std::string(name);
strncpy(func->_name, name, sizeof(func->_name));
}
return ihipLogStatus(ret);
}
@@ -297,9 +297,8 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f,
/*
Kernel argument preparation.
*/
grid_launch_parm lp;
//hStream = ihipPreLaunchKernel(hStream, 0, 0, &lp, f._name.empty() ? "ModuleKernel" : f._name.c_str());
hStream = ihipPreLaunchKernel(hStream, 0, 0, &lp, "ModuleKernel");
grid_launch_parm lp; // TODO - dummy arg but values are printed during debug.
hStream = ihipPreLaunchKernel(hStream, 0, 0, &lp, f._name);
hsa_kernel_dispatch_packet_t aql;
@@ -327,8 +326,7 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f,
lp.av->dispatch_hsa_kernel(&aql, config[1] /* kernarg*/, kernArgSize);
//ihipPostLaunchKernel(f._name.empty() ? "ModuleKernel" : f._name.c_str(), hStream, lp);
ihipPostLaunchKernel("ModuleKernel", hStream, lp);
ihipPostLaunchKernel(f._name, hStream, lp);
}
return ihipLogStatus(ret);