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


[ROCm/ROCR-Runtime commit: a4f898ad15]
Esse commit está contido em:
David Yat Sin
2022-11-04 17:36:33 +00:00
commit de Shweta Khatri
commit 523bdde26f
3 arquivos alterados com 20 adições e 0 exclusões
+5
Ver Arquivo
@@ -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;
}