Repository navigation
Conversation
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
kuhar
force-pushed
the
users/kuhar/python-execution-api
branch
from
October 19, 2026 23:34
aeae58b to
06e5552
Compare
Run upstream ROCm PyTorch and Triton on simulated AMD GPUs from Python,
including existing Colab notebooks. Support two execution styles.
Use run for a single call or Session to retain imports and runtime state
across calls in a subprocess. Preload the native interposer in the worker
without restarting the notebook or changing its GPU runtime:
```python
import rocjitsu
def add_one():
import torch
return (torch.arange(8, device="cuda") + 1).cpu()
result = rocjitsu.run(add_one, config=rocjitsu.config.gfx1250_mi455x)
```
For simulation in the main process, start with `python -m rocjitsu app.py`
to preload the interposer before Python starts. In app.py, call enable
before GPU discovery or framework imports:
```python
import rocjitsu
rocjitsu.enable(rocjitsu.config.gfx1250_mi455x)
import torch
result = (torch.arange(8, device="cuda") + 1).cpu()
```
Activation is one-way and keeps execution in the same interpreter.
An early import alone does not prepare an ordinary interpreter for enable;
use run or Session in an already running notebook.
Discover the native executable, Python worker and JSON presets from the
installation. Expose presets under their existing JSON filename stems.
Stage the Python package and its metadata with CMake for TheRock wheel
packaging. Using the bindings out of the box from a bundled wheel also
requires TheRock packaging changes, which will follow separately.
Prefer the wheel's matching native runtime and JSON presets; source
installs can use the notebook environment's native prefix. PyTorch
workloads need a ROCm-enabled build in the worker or prepared main
interpreter. Explicit launch overrides remain available.
Include a notebook example. Cover installation discovery, worker lifetime,
cancellation, error recovery and activation inheritance. Check PyTorch
and Triton execution on gfx1201 and gfx1250.
kuhar
force-pushed
the
users/kuhar/python-execution-api
branch
from
October 20, 2026 00:18
06e5552 to
e3de35e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run upstream ROCm PyTorch and Triton on simulated AMD GPUs from Python, including existing Colab notebooks. Support two execution styles.
Use run for a single call or Session to retain imports and runtime state across calls in a subprocess. Preload the native interposer in the worker without restarting the notebook or changing its GPU runtime:
For simulation in the main process, start with
python -m rocjitsu app.pyto preload the interposer before Python starts. In app.py, call enable before GPU discovery or framework imports:Activation is one-way and keeps execution in the same interpreter. An early import alone does not prepare an ordinary interpreter for enable; use run or Session in an already running notebook.
Discover the native executable, Python worker and JSON presets from the installation. Expose presets under their existing JSON filename stems.
Stage the Python package and its metadata with CMake for TheRock wheel packaging. Using the bindings out of the box from a bundled wheel also requires TheRock packaging changes, which will follow separately. Prefer the wheel's matching native runtime and JSON presets; source installs can use the notebook environment's native prefix. PyTorch workloads need a ROCm-enabled build in the worker or prepared main interpreter. Explicit launch overrides remain available.
Include a notebook example. Cover installation discovery, worker lifetime, cancellation, error recovery and activation inheritance. Check PyTorch and Triton execution on gfx1201 and gfx1250.