P4 to Git Change 1485337 by todli@todli-win-opencl-kv1 on 2017/11/21 18:53:38
SWDEV-126904 - Fix conformance Pipe read/write tests failures for ROCm/LC path and PAL/LC path Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#40 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#32 edit
This commit is contained in:
@@ -1291,6 +1291,7 @@ static inline HSAIL_ARG_TYPE GetKernelArgType(const KernelArgMD& lcArg) {
|
|||||||
switch (lcArg.mValueKind) {
|
switch (lcArg.mValueKind) {
|
||||||
case ValueKind::GlobalBuffer:
|
case ValueKind::GlobalBuffer:
|
||||||
case ValueKind::DynamicSharedPointer:
|
case ValueKind::DynamicSharedPointer:
|
||||||
|
case ValueKind::Pipe:
|
||||||
return HSAIL_ARGTYPE_POINTER;
|
return HSAIL_ARGTYPE_POINTER;
|
||||||
case ValueKind::ByValue:
|
case ValueKind::ByValue:
|
||||||
return HSAIL_ARGTYPE_VALUE;
|
return HSAIL_ARGTYPE_VALUE;
|
||||||
@@ -1358,7 +1359,9 @@ static inline HSAIL_ADDRESS_QUALIFIER GetKernelAddrQual(const KernelArgMD& lcArg
|
|||||||
}
|
}
|
||||||
LogError("Unsupported address type");
|
LogError("Unsupported address type");
|
||||||
return HSAIL_ADDRESS_ERROR;
|
return HSAIL_ADDRESS_ERROR;
|
||||||
} else if (lcArg.mValueKind == ValueKind::Image || lcArg.mValueKind == ValueKind::Sampler) {
|
} else if (lcArg.mValueKind == ValueKind::Image ||
|
||||||
|
lcArg.mValueKind == ValueKind::Sampler ||
|
||||||
|
lcArg.mValueKind == ValueKind::Pipe) {
|
||||||
return HSAIL_ADDRESS_GLOBAL;
|
return HSAIL_ADDRESS_GLOBAL;
|
||||||
}
|
}
|
||||||
return HSAIL_ADDRESS_ERROR;
|
return HSAIL_ADDRESS_ERROR;
|
||||||
@@ -1413,6 +1416,10 @@ static inline cl_kernel_arg_type_qualifier GetOclTypeQual(const KernelArgMD& lcA
|
|||||||
rv |= CL_KERNEL_ARG_TYPE_CONST;
|
rv |= CL_KERNEL_ARG_TYPE_CONST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (lcArg.mIsPipe) {
|
||||||
|
assert(lcArg.mValueKind == ValueKind::Pipe);
|
||||||
|
rv |= CL_KERNEL_ARG_TYPE_PIPE;
|
||||||
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ static inline ROC_ARG_TYPE GetKernelArgType(const KernelArgMD& lcArg) {
|
|||||||
switch (lcArg.mValueKind) {
|
switch (lcArg.mValueKind) {
|
||||||
case ValueKind::GlobalBuffer:
|
case ValueKind::GlobalBuffer:
|
||||||
case ValueKind::DynamicSharedPointer:
|
case ValueKind::DynamicSharedPointer:
|
||||||
|
case ValueKind::Pipe:
|
||||||
return ROC_ARGTYPE_POINTER;
|
return ROC_ARGTYPE_POINTER;
|
||||||
case ValueKind::ByValue:
|
case ValueKind::ByValue:
|
||||||
return ROC_ARGTYPE_VALUE;
|
return ROC_ARGTYPE_VALUE;
|
||||||
@@ -193,7 +194,9 @@ static inline ROC_ADDRESS_QUALIFIER GetKernelAddrQual(const KernelArgMD& lcArg)
|
|||||||
}
|
}
|
||||||
LogError("Unsupported address type");
|
LogError("Unsupported address type");
|
||||||
return ROC_ADDRESS_ERROR;
|
return ROC_ADDRESS_ERROR;
|
||||||
} else if (lcArg.mValueKind == ValueKind::Image || lcArg.mValueKind == ValueKind::Sampler) {
|
} else if (lcArg.mValueKind == ValueKind::Image ||
|
||||||
|
lcArg.mValueKind == ValueKind::Sampler ||
|
||||||
|
lcArg.mValueKind == ValueKind::Pipe) {
|
||||||
return ROC_ADDRESS_GLOBAL;
|
return ROC_ADDRESS_GLOBAL;
|
||||||
}
|
}
|
||||||
return ROC_ADDRESS_ERROR;
|
return ROC_ADDRESS_ERROR;
|
||||||
@@ -469,6 +472,10 @@ static inline cl_kernel_arg_type_qualifier GetOclTypeQual(const KernelArgMD& lcA
|
|||||||
rv |= CL_KERNEL_ARG_TYPE_CONST;
|
rv |= CL_KERNEL_ARG_TYPE_CONST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (lcArg.mIsPipe) {
|
||||||
|
assert(lcArg.mValueKind == ValueKind::Pipe);
|
||||||
|
rv |= CL_KERNEL_ARG_TYPE_PIPE;
|
||||||
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||||
|
|||||||
Reference in New Issue
Block a user