Skip to main content

A small package to create visualizations of PyTorch operation execution

Project description

TorchOpViz

A small package to create visualizations of PyTorch operation execution.

Install

Install PyTorch with CUDA support like:

pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126

Note torch>=2.1.0.

Install torchopviz:

pip3 install torchopviz

Usage

Offline mode:

from torchopviz import offline_viz
offline_viz(file="./complex_graph.json")

Online mode:

from torchopviz import online_viz
from torch import nn
model = nn.Sequential()
model.add_module('W0', nn.Linear(8, 16))
model.add_module('tanh', nn.Tanh())
model.add_module('W1', nn.Linear(16, 1))
data = torch.randn(1,8)
online_viz(model, data, save_dir="./sample_data")

example

TODO

Display distributed computation

Combine memory usage info

Optmization

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchopviz-0.1.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torchopviz-0.1.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file torchopviz-0.1.0.tar.gz.

File metadata

  • Download URL: torchopviz-0.1.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for torchopviz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06c01e1fec5c076d455ca3d534cf907c43d31834e70dc6a090acf25f142e2b17
MD5 44dc14b1504d3d4b498f47797378dd47
BLAKE2b-256 726e301ca1750c1d57b0542f65f3cc630532c2965658802aa13927523e955527

See more details on using hashes here.

File details

Details for the file torchopviz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: torchopviz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for torchopviz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d3097a07a5b3023d585179c70cf727ec9fbbe6d4bb874fc0bfe62078037a6fe
MD5 c994b91c16a2555aeaefc779984838a0
BLAKE2b-256 98ac9d0181c035739322c2d6ca59313819b6ff87829ee57fa8a4e588dec17953

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page