SWDEV-373630 - Added checks for invalid flags in hipOccupancy query functions
Change-Id: Ice1df4d3722354f40c8b02ba35ed122f9b2e2f2d
This commit is contained in:
@@ -443,6 +443,9 @@ hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int*
|
|||||||
if ((gridSize == nullptr) || (blockSize == nullptr)) {
|
if ((gridSize == nullptr) || (blockSize == nullptr)) {
|
||||||
HIP_RETURN(hipErrorInvalidValue);
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
}
|
}
|
||||||
|
if (flags != hipOccupancyDefault && flags != hipOccupancyDisableCachingOverride) {
|
||||||
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
|
}
|
||||||
const amd::Device& device = *hip::getCurrentDevice()->devices()[0];
|
const amd::Device& device = *hip::getCurrentDevice()->devices()[0];
|
||||||
int max_blocks_per_grid = 0;
|
int max_blocks_per_grid = 0;
|
||||||
int num_blocks = 0;
|
int num_blocks = 0;
|
||||||
@@ -484,6 +487,9 @@ hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
|
|||||||
if (numBlocks == nullptr) {
|
if (numBlocks == nullptr) {
|
||||||
HIP_RETURN(hipErrorInvalidValue);
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
}
|
}
|
||||||
|
if (flags != hipOccupancyDefault && flags != hipOccupancyDisableCachingOverride) {
|
||||||
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
|
}
|
||||||
const amd::Device& device = *hip::getCurrentDevice()->devices()[0];
|
const amd::Device& device = *hip::getCurrentDevice()->devices()[0];
|
||||||
|
|
||||||
int num_blocks = 0;
|
int num_blocks = 0;
|
||||||
|
|||||||
Verwijs in nieuw issue
Block a user