diff --git a/projects/clr/rocclr/compiler/lib/include/v0_8/aclEnums.h b/projects/clr/rocclr/compiler/lib/include/v0_8/aclEnums.h index 1f6432b6e7..e9f11f6dfb 100644 --- a/projects/clr/rocclr/compiler/lib/include/v0_8/aclEnums.h +++ b/projects/clr/rocclr/compiler/lib/include/v0_8/aclEnums.h @@ -258,7 +258,8 @@ typedef enum _acl_arg_type_enum_0_8 { ARG_TYPE_VALUE = 4, ARG_TYPE_POINTER = 5, ARG_TYPE_SEMAPHORE = 6, - ARG_TYPE_LAST = 7 + ARG_TYPE_QUEUE = 7, // enum for device enqueue + ARG_TYPE_LAST = 8 } aclArgType_0_8; // Enumerations of the valid data types for pass by value and diff --git a/projects/clr/rocclr/compiler/lib/include/v0_8/aclStructs.h b/projects/clr/rocclr/compiler/lib/include/v0_8/aclStructs.h index 6fdcc792bf..eee00b1e86 100644 --- a/projects/clr/rocclr/compiler/lib/include/v0_8/aclStructs.h +++ b/projects/clr/rocclr/compiler/lib/include/v0_8/aclStructs.h @@ -66,6 +66,13 @@ typedef struct _acl_md_arg_type_0_8 { bool isRestrict; bool isPipe; } pointer; + struct { // Struct for queue arguments + unsigned numElements; + unsigned cbNum; + unsigned cbOffset; + aclArgDataType data; + aclMemoryType memory; + } queue; } arg; aclArgType type; bool isConst; diff --git a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp index 780d458ba9..e477080fcc 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp @@ -3055,10 +3055,9 @@ GetHSAILArgType(const aclArgData* argInfo) { switch (argInfo->type) { case ARG_TYPE_POINTER: - if (argInfo->arg.pointer.memory == PTR_MT_SCRATCH_EMU) { - return HSAIL_ARGTYPE_QUEUE; - } return HSAIL_ARGTYPE_POINTER; + case ARG_TYPE_QUEUE: + return HSAIL_ARGTYPE_QUEUE; case ARG_TYPE_VALUE: return HSAIL_ARGTYPE_VALUE; case ARG_TYPE_IMAGE: @@ -3107,6 +3106,9 @@ GetHSAILAddrQual(const aclArgData* argInfo) (argInfo->type == ARG_TYPE_SAMPLER)) { return HSAIL_ADDRESS_GLOBAL; } + else if (argInfo->type == ARG_TYPE_QUEUE) { + return HSAIL_ADDRESS_GLOBAL; + } return HSAIL_ADDRESS_ERROR; } @@ -3195,6 +3197,7 @@ GetHSAILArgSize(const aclArgData *argInfo) case ARG_TYPE_POINTER: case ARG_TYPE_IMAGE: case ARG_TYPE_SAMPLER: + case ARG_TYPE_QUEUE: return sizeof(void*); default: return -1; @@ -3214,8 +3217,7 @@ GetOclType(const aclArgData* argInfo) }; uint sizeType; - if ((argInfo->type == ARG_TYPE_POINTER) && - (argInfo->arg.pointer.memory == PTR_MT_SCRATCH_EMU)) { + if (argInfo->type == ARG_TYPE_QUEUE) { return T_QUEUE; } if ((argInfo->type == ARG_TYPE_POINTER) || (argInfo->type == ARG_TYPE_IMAGE)) {