SWDEV-374371 - hipGraphAddMemsetNode should return error if width is 0
Change-Id: I1cd4be271f65c9cade8dddb6d00191e1b74c96bc
This commit is contained in:
1 parent
ce60d47b61
commit
409f23d905
1 file changed
+5
@@ -2748,6 +2748,11 @@ hipError_t ihipGraphMemsetParams_validate(const hipMemsetParams* pNodeParams) {
|
||||
if (pNodeParams == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
if (pNodeParams->width == 0) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
if (pNodeParams->elementSize != 1 && pNodeParams->elementSize != 2 && pNodeParams->elementSize != 4) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user