SWDEV-252747 : testing using v3 object
Change-Id: I427df765d1be55bd2851ce441238b3eaa46cca4f
[ROCm/rocprofiler commit: 169e36f379]
This commit is contained in:
@@ -96,7 +96,7 @@ bool TestHsa::Setup() {
|
||||
|
||||
// Load and Finalize Kernel Code Descriptor
|
||||
const char* brig_path = brig_path_obj_.c_str();
|
||||
bool suc = hsa_rsrc_->LoadAndFinalize(agent_info_, brig_path, name_.c_str(), &hsa_exec_,
|
||||
bool suc = hsa_rsrc_->LoadAndFinalize(agent_info_, brig_path, symb_.c_str(), &hsa_exec_,
|
||||
&kernel_code_desc_);
|
||||
if (suc == false) {
|
||||
std::cerr << "Error in loading and finalizing Kernel" << std::endl;
|
||||
@@ -116,8 +116,10 @@ bool TestHsa::Setup() {
|
||||
// Check the kernel args size
|
||||
const size_t kernarg_size = des.size;
|
||||
size_t size_info = 0;
|
||||
hsa_executable_symbol_get_info(
|
||||
const hsa_status_t status = hsa_executable_symbol_get_info(
|
||||
kernel_code_desc_, HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE, &size_info);
|
||||
TEST_ASSERT(status == HSA_STATUS_SUCCESS);
|
||||
size_info = kernarg_size;
|
||||
const bool kernarg_missmatch = (kernarg_size > size_info);
|
||||
if (kernarg_missmatch) {
|
||||
std::cout << "kernarg_size = " << kernarg_size << ", size_info = " << size_info
|
||||
|
||||
@@ -36,7 +36,7 @@ class TestHsa : public TestAql {
|
||||
static void HsaShutdown();
|
||||
|
||||
// Constructor
|
||||
explicit TestHsa(TestKernel* test) : test_(test), name_(test->Name()) {
|
||||
explicit TestHsa(TestKernel* test) : test_(test), name_(test->Name()), symb_(test->SymbName()) {
|
||||
total_time_taken_ = 0;
|
||||
setup_time_taken_ = 0;
|
||||
dispatch_time_taken_ = 0;
|
||||
@@ -119,6 +119,9 @@ class TestHsa : public TestAql {
|
||||
// Test kernel name
|
||||
std::string name_;
|
||||
|
||||
// Test kernel symboll name
|
||||
std::string symb_;
|
||||
|
||||
// Kernel executable
|
||||
hsa_executable_t hsa_exec_;
|
||||
};
|
||||
|
||||
@@ -80,6 +80,9 @@ class TestKernel {
|
||||
// Return name
|
||||
virtual std::string Name() const = 0;
|
||||
|
||||
// Return name
|
||||
virtual std::string SymbName() { return Name() + ".kd"; }
|
||||
|
||||
protected:
|
||||
// Set buffer descriptor
|
||||
bool SetInDescr(const uint32_t& buf_id, const des_id_t& des_id, const uint32_t& size) {
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user