SWDEV-374371 - hipGraphAddMemsetNode should return error if width is 0
Change-Id: I1cd4be271f65c9cade8dddb6d00191e1b74c96bc
This commit is contained in:
@@ -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