SWDEV-374371 - hipGraphAddMemsetNode should return error if width is 0

Change-Id: I1cd4be271f65c9cade8dddb6d00191e1b74c96bc
This commit is contained in:
Satyanvesh Dittakavi committed 2023-01-03 10:29:16 -05:00
1 parent ce60d47b61
commit 409f23d905
1 file changed
+5
+5
View File
@@ -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;
}