diff --git a/runtime/hsa-runtime/core/runtime/runtime.cpp b/runtime/hsa-runtime/core/runtime/runtime.cpp index bd6a2d8e6c..8412561608 100644 --- a/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -1826,6 +1826,14 @@ hsa_status_t Runtime::SetSvmAttrib(void* ptr, size_t size, clear_flags |= HSA_SVM_FLAG_GPU_READ_MOSTLY; break; } + case HSA_AMD_SVM_ATTRIB_GPU_EXEC: { + Check(attrib); + if (value) + set_flags |= HSA_SVM_FLAG_GPU_EXEC; + else + clear_flags |= HSA_SVM_FLAG_GPU_EXEC; + break; + } case HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE: { Agent* agent = Convert(value); ConfirmNew(agent); diff --git a/runtime/hsa-runtime/inc/hsa_ext_amd.h b/runtime/hsa-runtime/inc/hsa_ext_amd.h index 9c9ef3d773..b59642ea6c 100644 --- a/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -2280,6 +2280,9 @@ typedef enum hsa_amd_svm_attribute_s { // range will be read operations. // Type of this attribute is bool. HSA_AMD_SVM_ATTRIB_READ_MOSTLY = 6, + // Allows the execution on GPU. + // Type of this attribute is bool. + HSA_AMD_SVM_ATTRIB_GPU_EXEC = 7, // This attribute can not be used in ::hsa_amd_svm_attributes_get. // Enables an agent for access to the range. Access may incur a page fault // and associated memory migration. Either this or