Add env variable to print image SRD contents

Add environment variable HSA_IMAGE_PRINT_SRD to print contents of SRD
registers for image functions

Change-Id: Ifb47a73dcfad8745ee7445e20de96e1021b80bd6
这个提交包含在:
David Yat Sin 编写, Shweta Khatri 于 2023-01-13 11:01:04 -05:00 提交
1 父节点 f7e3782b42
当前提交 a4f898ad15
3 个文件已更改
+20

没有与搜索条件相匹配的文件

可执行文件 -> 普通文件
+5
查看文件
@@ -47,6 +47,7 @@
#include <climits>
#include <mutex>
#include "core/inc/runtime.h"
#include "core/inc/hsa_internal.h"
#include "core/inc/hsa_ext_amd_impl.h"
#include "resource.h"
@@ -397,6 +398,8 @@ hsa_status_t ImageRuntime::CreateImageHandle(
image_manager(component)->PopulateImageSrd(*image);
if (core::Runtime::runtime_singleton_->flag().image_print_srd()) image->printSRD();
image_handle.handle = image->Convert();
return HSA_STATUS_SUCCESS;
@@ -434,6 +437,8 @@ hsa_status_t ImageRuntime::CreateImageHandleWithLayout(
return err;
}
if (core::Runtime::runtime_singleton_->flag().image_print_srd()) image->printSRD();
image_handle.handle = image->Convert();
return HSA_STATUS_SUCCESS;
}