Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init CI #5

Merged
merged 90 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
22b03b8
Init CI
tejas3070 Mar 1, 2024
513c852
Merge branch 'main' into tejas3070-patch-1
tejas3070 Mar 1, 2024
ae013ea
Merge branch 'main' of https://github.com/Deep-Learning-Profiling-Too…
Mar 1, 2024
00b6532
Merge branch 'main' of https://github.com/Deep-Learning-Profiling-Too…
Mar 6, 2024
d5cdbec
Update python-app.yml
tejas3070 Mar 6, 2024
9424015
Updated CI test
Mar 6, 2024
c1e64ee
Merge branch 'tejas3070-patch-1' of https://github.com/Deep-Learning-…
Mar 6, 2024
1f94776
Updated python-app.yml (Test #2)
tejas3070 Mar 6, 2024
007a797
Update python-app.yml (Test #3)
tejas3070 Mar 6, 2024
d87b0ab
Update python-app.yml (Test #4)
tejas3070 Mar 6, 2024
cc37e03
Update python-app.yml (Test #5)
tejas3070 Mar 6, 2024
9ddceb7
Update python-app.yml (Test #6)
tejas3070 Mar 6, 2024
aacbdcd
Update python-app.yml (Test #7)
tejas3070 Mar 6, 2024
e10046e
Update python-app.yml (Test #8)
tejas3070 Mar 6, 2024
23e7788
Updated requirements.txt
Mar 6, 2024
8645d77
Update python-app.yml (Test #9)
tejas3070 Mar 6, 2024
59860a1
Update python-app.yml (Test #10)
tejas3070 Mar 6, 2024
15bfa98
Update python-app.yml (Test #11)
tejas3070 Mar 6, 2024
f439270
Update python-app.yml (Test #11)
tejas3070 Mar 7, 2024
b592070
Update python-app.yml (Test #12)
tejas3070 Mar 7, 2024
36a59c9
Update python-app.yml (Test #13)
tejas3070 Mar 7, 2024
41beb15
Update python-app.yml (Test #14)
tejas3070 Mar 7, 2024
2f44f14
Update python-app.yml (Test #15)
tejas3070 Mar 7, 2024
826e201
Update python-app.yml (Test #16)
tejas3070 Mar 7, 2024
a3e20b0
Update python-app.yml (Test #17)
tejas3070 Mar 7, 2024
c556a5f
Update python-app.yml (Test #18)
tejas3070 Mar 7, 2024
9a318db
Update python-app.yml (Test #19)
tejas3070 Mar 7, 2024
5b75f62
Update python-app.yml (Test #20)
tejas3070 Mar 7, 2024
1374552
Update python-app.yml (Test #21)
tejas3070 Mar 7, 2024
026cb0f
Update python-app.yml (Test #22)
tejas3070 Mar 7, 2024
218de91
Update python-app.yml (Test Cache#1)
tejas3070 Mar 7, 2024
b088c35
Update python-app.yml (Test Cache#2)
tejas3070 Mar 7, 2024
5f34a31
Test Cache#3
Mar 7, 2024
cf54b76
Update python-app.yml (Test Cache#4)
tejas3070 Mar 8, 2024
625a6f6
Update python-app.yml (Test Cache #5)
tejas3070 Mar 8, 2024
b36950b
Update python-app.yml (Test Cache#5)
tejas3070 Mar 8, 2024
02d9d2b
Update python-app.yml (Test Cache#6)
tejas3070 Mar 8, 2024
1e43642
Update python-app.yml (Test Cache#7)
tejas3070 Mar 8, 2024
154bb46
Update python-app.yml (Test Cache#8)
tejas3070 Mar 8, 2024
20c0e26
Update python-app.yml (Test Cache#9)
tejas3070 Mar 8, 2024
f6d50ea
Update python-app.yml (Test Cache#10)
tejas3070 Mar 8, 2024
900b93c
Update python-app.yml (Test Cache#11)
tejas3070 Mar 8, 2024
ca2ce78
Update python-app.yml (Test Cache#12)
tejas3070 Mar 8, 2024
11fe12d
Update python-app.yml (Test Cache#13)
tejas3070 Mar 8, 2024
426f197
Fixed Tests
Mar 8, 2024
d7a588d
Update python-app.yml (Test Cache#14)
tejas3070 Mar 8, 2024
f219dbb
Update python-app.yml (Test Cache#15)
tejas3070 Mar 8, 2024
33af948
Updated setup.py
Mar 8, 2024
bb2fdfb
Update python-app.yml (Test Cache#16)
tejas3070 Mar 8, 2024
9c9ee6a
Update python-app.yml (Test Cache#17)
tejas3070 Mar 8, 2024
7261c7a
Update python-app.yml (Test Cache#18)
tejas3070 Mar 8, 2024
a4c7207
Test Cache#20
Mar 8, 2024
16a0bd7
Update python-app.yml (Test Cache#21)
tejas3070 Mar 8, 2024
db91b66
Update python-app.yml (Test Cache#22)
tejas3070 Mar 9, 2024
8a6d09c
Update python-app.yml (Test Cache#22)
tejas3070 Mar 9, 2024
c9a7476
Update python-app.yml (Test Cache#23)
tejas3070 Mar 9, 2024
c09a7cd
Update python-app.yml (Test Cache#24)
tejas3070 Mar 9, 2024
c3d25c8
Update python-app.yml (Test Cache#25)
tejas3070 Mar 9, 2024
3c16e92
Update python-app.yml (Test Cache#26)
tejas3070 Mar 9, 2024
71ef6c7
Update python-app.yml (Test Cache#26)
tejas3070 Mar 9, 2024
40e3499
Update python-app.yml (Test Cache#27)
Mar 9, 2024
eab2ef6
Update python-app.yml (Test Cache#28)
tejas3070 Mar 9, 2024
271082b
Update python-app.yml (Test Cache#29)
tejas3070 Mar 9, 2024
eb9b289
Update python-app.yml
tejas3070 Mar 9, 2024
2b44bab
Update python-app.yml (Test Cache#30)
tejas3070 Mar 9, 2024
7ed1bea
Update python-app.yml (Test Cache#30)
tejas3070 Mar 9, 2024
4f55984
Update python-app.yml (Test Cache#31)
tejas3070 Mar 9, 2024
501c2e7
Update python-app.yml (Test Cache#32)
tejas3070 Mar 9, 2024
389f263
Update python-app.yml (Test Cache#33)
tejas3070 Mar 9, 2024
5585a9c
Update python-app.yml (Test Cache#34)
tejas3070 Mar 9, 2024
fdf5ffe
Update python-app.yml (Test Cache#35)
tejas3070 Mar 9, 2024
3e36978
Update python-app.yml (Test Cache#36)
tejas3070 Mar 9, 2024
b90c377
Update python-app.yml (Test Cache#37)
Mar 9, 2024
2659b40
Update python-app.yml (Test Cache#38)
tejas3070 Mar 9, 2024
07f79a9
Update python-app.yml (Test Cache#39)
tejas3070 Mar 9, 2024
b79135c
Update python-app.yml (Test Cache#40)
tejas3070 Mar 9, 2024
0609aae
Update python-app.yml (Test Cache#40)
tejas3070 Mar 9, 2024
650bc43
Update python-app.yml (Test Cache#41)
tejas3070 Mar 9, 2024
43f3b64
Update python-app.yml (Test Cache#42)
tejas3070 Mar 9, 2024
d61ceb0
Pre-commited updated CI
Mar 9, 2024
df55bf6
Merge branch 'tejas3070-patch-1' of https://github.com/Deep-Learning-…
Mar 9, 2024
e97aa3a
Test Cache#43
Mar 9, 2024
747c904
Update python-app.yml (Test Cache#44)
tejas3070 Mar 9, 2024
87740e0
Update python-app.yml (Test Cache#45)
tejas3070 Mar 9, 2024
1648f14
Update python-app.yml (Test Cache#46)
tejas3070 Mar 9, 2024
8e9be3f
Update python-app.yml (Test Cache#47)
tejas3070 Mar 9, 2024
de7498e
Update python-app.yml (Latest Cache)
tejas3070 Mar 9, 2024
f16bdea
Update python-app.yml (Latest Cache#2)
tejas3070 Mar 9, 2024
7aa3232
Updated interpreter.py
Mar 9, 2024
8262c86
Merge branch 'tejas3070-patch-1' of https://github.com/Deep-Learning-…
Mar 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
path: 'triton_viz'

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Cache Dependencies
uses: actions/cache@v3
id: cache-pip
with:
path: /opt/hostedtoolcache/Python/3.10.13/x64
key: ${{ runner.os }}-pip-3.10-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Clone Triton and Install
run: |
git clone https://github.com/openai/triton.git
cd triton/python
pip install -e .

- name: Install Dependencies if Cache Missed
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
cd triton_viz
pip install -e .
pre-commit install
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
pip uninstall pytorch-triton -y

- name: Lint with pre-commit
run: |
cd triton_viz
pre-commit run --all-files

- name: Test with pytest
run: |
cd triton_viz
python -m pytest Examples
8 changes: 8 additions & 0 deletions Examples/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest
from triton_viz.interpreter import record_builder


@pytest.fixture(autouse=True, scope="function")
def clear_cache():
yield
record_builder.reset()
2 changes: 1 addition & 1 deletion Examples/vec_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def perform_vec_add(device, size):
torch.manual_seed(0)
x = torch.rand(size, device=device)
y = torch.rand(size, device=device)
output = add(x, y) # Assuming add() is your custom function
output, grid = add(x, y) # Assuming add() is your custom function
return x, y, output


Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"triton",
"gradio",
"chalk-diagrams @ git+https://github.com/chalk-diagrams/chalk.git",
"pyarrow",
"pre-commit",
"pytest",
],
)
3 changes: 1 addition & 2 deletions triton_viz/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import tempfile



def launch():
cache = {}
program_records, tt = triton_viz.collect_grid()
Expand All @@ -19,7 +18,7 @@ def launch():
s1 = gr.Slider(0, m[0], value=0, step=1, label="Program Id 0")
s2 = gr.Slider(0, m[1], value=0, step=1, label="Program Id 1")
s3 = gr.Slider(0, m[2], value=0, step=1, label="Program Id 2")

def update(inp):
a = inp[s1]
b = inp[s2]
Expand Down
5 changes: 3 additions & 2 deletions triton_viz/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ def wrapper(arg, axis):

def _create_reduce(fn, op_name):
@wraps(fn)
def wrapper(input, axis, keep_dims=False):
ret = fn(input, axis, keep_dims)
def wrapper(input, axis=None, **kwargs):
ret = fn(input, axis=axis, **kwargs)
keep_dims = kwargs.get("keep_dims", False)
reduce_record = Reduce(
input_shape=input.handle.data.shape,
index=axis,
Expand Down
Loading