Sarek_hip.Hip_apival check : string -> Hip_types.hip_result -> unithipModuleLaunchKernel is asynchronous and the HIP stack snapshots the kernel parameters at dispatch time, not at the call site (see the CUDA sibling's note - it explicitly calls out the HIP behaviour). Freeing the arg cells when Kernel.launch returns would be a use-after-free once the GC reclaims them. We retain them until the stream that ran the launch is drained, keyed by (device_id, stream_key). Values are kept as Obj.t for liveness only and never inspected. A mutex guards the list against concurrent domains.
module Device : sig ... endmodule Memory : sig ... endmodule Stream : sig ... endmodule Event : sig ... endmodule Kernel : sig ... endAvailable if libamdhip64 loads, libhiprtc loads, and at least one device is present. hiprtc is required because this backend is JIT-only (HIP C++ -> code object at runtime).
val memory_info : Device.t -> int64 * int64