You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
[Issue]: hipGraphAddMemFreeNode returns hipErrorInvalidValue on a graph from an active stream capture #6701
hipGraphAddMemFreeNode returns hipErrorInvalidValue when the graph being
added to came from an active stream capture. The identical call on a
hand-built graph succeeds.
The graph's origin is the only variable that changes the outcome. Dependency
count, dependency identity, and whether the matching hipGraphAddMemAllocNode
is present all turn out to be irrelevant.
During the capture, obtain the capturing graph via hipStreamGetCaptureInfo.
Call hipGraphAddMemFreeNode(&node, graph, deps, nDeps, ptr) on that graph.
Observed: hipErrorInvalidValue (error 1, "invalid argument").
Expected: the node is added, as it is for a graph not obtained from a capture.
Evidence
Four cases, each in its own process, differing only as shown:
graph origin
dependencies
result
hand-built
MemFree depends on MemAlloc
success
hand-built
zero dependencies
success
active stream capture
frontier dependencies
hipErrorInvalidValue
active stream capture
zero dependencies
hipErrorInvalidValue
Supporting state at the time of the failing calls:
hipDeviceAttributeMemoryPoolsSupported = 1
hipMallocAsyncduring the same capture succeeds and returns a valid pointer
capture info is healthy: status=1, ndeps=1
Two explanations we checked and ruled out
Both looked likely from reading the source, and both are wrong:
A missing or mismapped hipGraphAddMemFreeNode binding. The mapping is
present and the same call succeeds twice in the hand-built cases.
An empty-dependency-list edge case. Zero dependencies succeeds standalone
and fails inside capture, so the dependency count is not the variable.
Impact
The caller cannot distinguish this from a genuine argument error, so the usual
recovery is to drop the allocation from its own tracking while the graph still
owns it. Accumulated over a test suite that exercises this path, that was enough
to terminate the process.
A caller can work around it by deferring the free until after the capture ends,
at the cost of the graph retaining the allocation and a larger memory footprint.
Duplicate of ROCm/TheRock#9295, which reports the same behaviour and was filed first. Closing this one; I have moved the extra probe data onto ROCm/TheRock#9295. Apologies for the noise.
Activity
zhihuidu-amd commentedon Oct 14, 2026
Duplicate of ROCm/TheRock#9295, which reports the same behaviour and was filed first. Closing this one; I have moved the extra probe data onto ROCm/TheRock#9295. Apologies for the noise.