Skip to main content

Cascade Profiler

GPU workload profiling, Nsight Systems timing reconciliation, and NVBit instruction tracing for vLLM. Python 3.10+ can import and inspect runs; GPU workloads require CUDA, vLLM, and the tracing tools. Modal images use Python 3.12. The installable package only profiles; it does not provide CPU simulation.

pip install 'cascade-profiler[modal]'
from cascade_profiler import Workload, profile

workload = Workload("facebook/opt-125m", ["Hello, my name is"], max_tokens=32, repeats=4)
result = profile(workload, "/data/phases", trace_steps="plan", trace_repeat=1)
print(result.run_dir, result.stage_wall_s)

profile needs a GPU environment with vLLM, Nsight Systems and the NVBit tracer installed. cascade_profiler.image() supplies the optional Modal GPU image; register(app, volume, gpu="H100!") registers only the GPU .profile function. See PROFILER_RUNS.md and examples/modal_app.py.

Download the example's run with modal volume get my-profiler-runs <run_name> ./<run_name>.

Optional S3-compatible output uploads the finished run while retaining the volume copy:

prof = register(app, runs, gpu="H100!", hf_cache=hf,
    s3={"endpoint": "https://s3.example.com", "bucket": "my-runs", "prefix": "profiles",
        "region": "auto", "addressing_style": "path"},
    secrets=[modal.Secret.from_name("my-s3-credentials")])

The same s3 dictionary can be passed to profile() or .profile.remote(). Install cascade-profiler[modal] (or boto3>=1.36) for S3 uploads. Credentials come only from AWS environment variables or the caller's Modal secret, never destination options or files. run.json and traced/metadata.json record the destination and final s3://my-runs/profiles/<run_name> URI.

Our repository-local app

From this checkout:

modal run accelsim_trace.py::e2e_main --run-name my-run --trace-steps plan
# Timing only (no NVBit or simulation):
modal run accelsim_trace.py::e2e_main --run-name timing-run --timing-only
# Profiling and tracing only, without simulation:
modal run accelsim_trace.py::e2e_main --run-name trace-run --trace-steps plan --profile-only

Our app's CPU execution, image build, deduplication and interpolation live in accelsim_local.py, which is not shipped by pip. These are internal tools for our own hardware, not a supported cascade_profiler API. To simulate an existing run in our app's accelsim-traces volume:

modal run accelsim_trace.py::simulate --run-name my-run --gpu-config SM90_H100 --propagate interp

The run directory is the interface: run.json, corrected_timeline.json, trace_alignment.json, and traced/traces/ are produced by the profiler. The simulator consumes them and writes sim_durations.json and sim/. The installable profiler does not build or execute the CPU simulator.

See the OPT-125m sample analysis for a worked end-to-end example.

See the run-directory contract for ownership, schemas, identity/units, compatibility rules, real examples, and end-to-end commands.

Metadata

Release files for cascade-profiler 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cascade-profiler 0.1.1
File Size Uploaded Provenance Actions
cascade_profiler-0.1.1.tar.gz 59.1 kB Without provenance Details for cascade_profiler-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cascade-profiler 0.1.1
File Interpreter ABI Platform Actions
cascade_profiler-0.1.1-py3-none-any.whl Python 3 none any Details for cascade_profiler-0.1.1-py3-none-any.whl

Total release size: 105.6 kB

Release files / cascade_profiler-0.1.1.tar.gz

Download URL cascade_profiler-0.1.1.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cbbd51ff19c7b37e8c0b9249b157b7d5653739717fdc85fd79c797d0fbf6a3f8
BLAKE2b-256 checksum
How to use checksums
b25fc11fe4ca68370a4077fcd329a895b988f616dc1c2b429614a44b4f79baf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / cascade_profiler-0.1.1-py3-none-any.whl

Download URL cascade_profiler-0.1.1-py3-none-any.whl
Size 46.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2a7a8767092a337d6d187cd32b35e8c3c08c4f3f5f2d6c39b96af0bf248f64c
BLAKE2b-256 checksum
How to use checksums
4887afd3a688d758fcad097a3b0061b63971b0bee7e061d6aa1866a8c813a2cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for cascade-profiler 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page