tvm_tirx.backend.cuda.iket

tvm_tirx.backend.cuda.iket#

NVIDIA IKET annotations and run-iket orchestration.

profile runs an explicit replayable command. run is intended for a script’s __main__ block: the parent process asks run-iket to replay the original script or python -m invocation, while the injected tracker and capture processes execute the supplied callable and then exit.

Classes#

IketProfileError(message, *[, returncode, ...])

An error while validating or running an official IKET profile.

IketProfileResult(output_dir, postprocess, ...)

Published artifacts from a successful official IKET profile.

IketProfiler(*args, **kwargs)

TIRx annotations compiled for NVIDIA's official IKET runtime.

Functions#

validate_official_environment()

Validate the supported official runtime before an instrumented CUBIN is loaded.

profile(command, *, output_dir[, ...])

Profile a replayable command with NVIDIA's official run-iket tool.

run(main, *, output_dir[, postprocess, ...])

Replay the active script under run-iket and execute main in its passes.

Device annotations#

IketProfiler provides checkpoints and two range forms inside TVMScript:

Method

Meaning

mark(name)

Record a named checkpoint.

range_push(name) / range_pop()

Bracket nested ranges in stack order.

range_start(name) / range_end(token)

Connect a start and end through the returned uint32 token.

Capture and artifacts#

run(workload, ...) replays the active Python script or module under the official IKET tracker and capture processes. Put GPU initialization, compilation, and launches inside the callable, and invoke run from the script’s __main__ block. For a separate driver, profile takes a replayable command such as [sys.executable, "profile_workload.py"]; that command compiles and runs its instrumented kernels without starting another capture.

output_dir selects the published artifact directory. The postprocess option accepts "json", "perfetto", "html", "all", or "none". Use clobber=True to replace an existing output directory. The function signatures list timeout and capture-limit options.

IketProfileResult.trace_json, perfetto, and html return the single artifact of each requested format. For captures producing multiple artifacts, use json_traces, perfetto_traces, and html_reports instead. The Profiling with IKET guide contains a complete annotation and capture example.