SWDEV-313082 - hipGraphMemsetNodeSetParams invalid params

Change-Id: Ibe57df8d7d583daf9ba9c7a86863eacca4868f3a
Этот коммит содержится в:
Ajay authored and Ajay GunaShekar committed 2022-01-28 19:27:32 -05:00
1 родитель 0440d945e8
Коммит cb79dc7486
4 files changed
+35 -2

No files matched your search

+14
Просмотреть файл
@@ -2276,6 +2276,20 @@ hipError_t ihipMemset_validate(void* dst, int64_t value, size_t valueSize,
return hipSuccess;
}
hipError_t ihipGraphMemsetParams_validate(const hipMemsetParams* pNodeParams) {
if (pNodeParams == nullptr) {
return hipErrorInvalidValue;
}
if (pNodeParams->elementSize != 1 && pNodeParams->elementSize != 2 && pNodeParams->elementSize != 4) {
return hipErrorInvalidValue;
}
if (pNodeParams->height <= 0) {
return hipErrorInvalidValue;
}
return hipSuccess;
}
hipError_t ihipMemsetCommand(std::vector<amd::Command*>& commands, void* dst, int64_t value,
size_t valueSize, size_t sizeBytes, amd::HostQueue* queue) {
hipError_t hip_error = hipSuccess;