diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index b23952e984..31e07208f1 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -891,6 +891,12 @@ hipError_t capturehipMemsetAsync(hipStream_t& stream, void*& dst, int& value, si if (!hip::isValid(stream)) { return hipErrorContextIsDestroyed; } + + // No work should be done + if (sizeBytes == 0) { + return hipSuccess; + } + hipMemsetParams memsetParams = {0}; memsetParams.dst = dst; memsetParams.value = value;