SWDEV-314665 - hipGraphInstantiateWithFlags negative scenarios

Change-Id: Ic44333332a98a525a07c9911bda1c2e930eb9e3c
这个提交包含在:
Ajay
2022-02-03 18:27:42 +00:00
提交者 Ajay GunaShekar
父节点 27f102b167
当前提交 ab8c30cf78
+9
查看文件
@@ -934,6 +934,15 @@ hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph,
hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph,
unsigned long long flags) {
HIP_INIT_API(hipGraphInstantiateWithFlags, pGraphExec, graph, flags);
if (pGraphExec == nullptr || graph == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
//invalid flag check
if (flags != hipGraphInstantiateFlagAutoFreeOnLaunch){
HIP_RETURN(hipErrorInvalidValue);
}
// enable when change is merged to hip
// if (flags == hipGraphInstantiateFlagAutoFreeOnLaunch) {
// Free any unfreed memory allocations before the graph is relaunched