File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -102,19 +102,14 @@ tritonparse.structured_logging.init(log_path)
102
102
# === TritonParse init end ===
103
103
104
104
# The below is your original Triton/PyTorch 2 code
105
- # Example: Using with torch.compile
106
- def your_kernel ():
107
- # Your PyTorch/Triton kernel code
108
- pass
109
-
110
- compiled_kernel = torch.compile(your_kernel)
111
- result = compiled_kernel()
105
+ ...
112
106
113
107
# === TritonParse parse ===
114
108
import tritonparse.utils
115
109
tritonparse.utils.unified_parse(log_path)
116
110
# === TritonParse parse end ===
117
111
```
112
+ See a full example in [ ` tests/test_add.py ` ] ( https://github.com/pytorch-labs/tritonparse/blob/main/tests/test_add.py ) .
118
113
119
114
### 2. Analyze with Web Interface
120
115
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ function App() {
367
367
{ dataLoaded && kernels . length > 0 && ! selectedIR && (
368
368
< div className = "flex space-x-4" >
369
369
< button
370
- className = { `px-3 py-2 text-sm font-medium rounded-md ${ activeTab === "overview" ? "bg-gray-100 text-gray-900 " : "text-gray-500 hover:text-gray-700 "
370
+ className = { `px-3 py-2 text-sm font-medium rounded-md ${ activeTab === "overview" ? "bg-blue-700 text-white shadow-md " : "bg-blue-100 text-blue-700 hover:bg-blue-200 "
371
371
} `}
372
372
onClick = { ( ) => {
373
373
setActiveTab ( "overview" ) ;
@@ -384,7 +384,7 @@ function App() {
384
384
Kernel Overview
385
385
</ button >
386
386
< button
387
- className = { `px-3 py-2 text-sm font-medium rounded-md ${ activeTab === "comparison" ? "bg-gray-100 text-gray-900 " : "text-gray-500 hover:text-gray-700 "
387
+ className = { `px-3 py-2 text-sm font-medium rounded-md ${ activeTab === "comparison" ? "bg-blue-700 text-white shadow-md " : "bg-blue-100 text-blue-700 hover:bg-blue-200 "
388
388
} `}
389
389
onClick = { ( ) => {
390
390
setActiveTab ( "comparison" ) ;
Original file line number Diff line number Diff line change @@ -91,18 +91,18 @@ const KernelOverview: React.FC<KernelOverviewProps> = ({
91
91
< h2 className = "text-xl font-semibold mb-4 text-gray-800" >
92
92
Available Kernels
93
93
</ h2 >
94
- < div className = "grid grid-cols-1 gap-2" >
94
+ < div className = "flex flex-wrap gap-2" >
95
95
{ kernels . map ( ( k , index ) => (
96
96
< button
97
97
key = { index }
98
- className = { `p-3 text-left rounded-md transition-colors ${
98
+ className = { `px-4 py-2 text-sm rounded-md transition-colors whitespace-nowrap ${
99
99
index === selectedKernel
100
- ? "bg-blue-100 border border-blue-300"
101
- : "bg-gray-50 border border-gray-200 hover:bg-blue-50"
100
+ ? "bg-blue-100 border border-blue-300 text-blue-800 "
101
+ : "bg-gray-50 border border-gray-200 hover:bg-blue-50 text-gray-800 "
102
102
} `}
103
103
onClick = { ( ) => onSelectKernel ( index ) }
104
104
>
105
- < div className = "font-medium text-gray-800 " > { k . name } </ div >
105
+ < div className = "font-medium" > { k . name } </ div >
106
106
</ button >
107
107
) ) }
108
108
</ div >
You can’t perform that action at this time.
0 commit comments