You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 3rdparty/amd/tuning/TUNING.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -29,18 +29,18 @@ def _triton_kernel_funtion():
29
29
...
30
30
```
31
31
## 2. Torch Tunable Operations
32
-
**TunableOp** is a feature in PyTorch that allows for the definition and optimization of custom kernels with tunable parameters. This feature is particularly useful for enhancing the performance of kernels by experimenting with different configurations.
32
+
**TunableOp** is a feature in PyTorch that allows for the definition and optimization of custom kernels with tunable parameters. This feature is particularly useful for enhancing the performance of kernels by experimenting with different configurations.
33
33
34
34
### Key Environment Variables:
35
-
1.**PYTORCH_TUNABLEOP_ENABLED**:
35
+
1.**PYTORCH_TUNABLEOP_ENABLED**:
36
36
- Default: `0`
37
37
- Set to `1` to enable TunableOp.
38
38
39
-
2.**PYTORCH_TUNABLEOP_TUNING**:
39
+
2.**PYTORCH_TUNABLEOP_TUNING**:
40
40
- Default: `1`
41
41
- Set to `0` to disable tuning. If a tuned entry is not found, it will run the tuning step and record the entry when PYTORCH_TUNABLEOP_ENABLED is enabled.
42
42
43
-
3.**PYTORCH_TUNABLEOP_VERBOSE**:
43
+
3.**PYTORCH_TUNABLEOP_VERBOSE**:
44
44
- Default: `0`
45
45
- Set to `1` to enable verbose output for TunableOp.
46
46
@@ -66,20 +66,20 @@ The following are suggestions for optimizing matrix multiplication (GEMM) and co
66
66
To tune Triton kernels with GEMM and convolution ops (conv), use the `torch.compile` function with the max-autotune mode. This benchmarks a predefined list of Triton configurations and selects the fastest one for each shape.
67
67
68
68
### Key Configurations:
69
-
1.**Max Autotune**:
69
+
1.**Max Autotune**:
70
70
- Set `torch._inductor.config.max_autotune = True` or `TORCHINDUCTOR_MAX_AUTOTUNE=1`.
s+="""Task: Turn the input into (subject, predicate, object).
59
-
Input: Sam Johnson is eating breakfast.
60
-
Output: (Dolores Murphy, eat, breakfast)
61
-
---
59
+
Input: Sam Johnson is eating breakfast.
60
+
Output: (Dolores Murphy, eat, breakfast)
61
+
---
62
62
Input: Joon Park is brewing coffee.
63
63
Output: (Joon Park, brew, coffee)
64
64
---
65
-
Input: Jane Cook is sleeping.
65
+
Input: Jane Cook is sleeping.
66
66
Output: (Jane Cook, is, sleep)
67
67
---
68
-
Input: Michael Bernstein is writing email on a computer.
68
+
Input: Michael Bernstein is writing email on a computer.
69
69
Output: (Michael Bernstein, write, email)
70
70
---
71
-
Input: Percy Liang is teaching students in a classroom.
71
+
Input: Percy Liang is teaching students in a classroom.
72
72
Output: (Percy Liang, teach, students)
73
73
---
74
-
Input: Merrie Morris is running on a treadmill.
74
+
Input: Merrie Morris is running on a treadmill.
75
75
Output: (Merrie Morris, run, treadmill)
76
76
---"""
77
77
s+=persona_name+"is"+action+".\n"
@@ -107,17 +107,17 @@ def action_location_sector(
107
107
current_action,
108
108
next_action,
109
109
):
110
-
s+="""Task -- choose an appropriate area from the area options for a task at hand.
110
+
s+="""Task -- choose an appropriate area from the area options for a task at hand.
111
111
Sam Kim lives in {Sam Kim's house} that has Sam Kim's room, bathroom, kitchen.
112
-
Sam Kim is currently in {Sam Kim's house} that has Sam Kim's room, bathroom, kitchen.
112
+
Sam Kim is currently in {Sam Kim's house} that has Sam Kim's room, bathroom, kitchen.
113
113
Area options: {Sam Kim's house, The Rose and Crown Pub, Hobbs Cafe, Oak Hill College, Johnson Park, Harvey Oak Supply Store, The Willows Market and Pharmacy}.
114
114
* Stay in the current area if the activity can be done there. Only go out if the activity needs to take place in another place.
115
115
* Must be one of the "Area options," verbatim.
116
116
For taking a walk, Sam Kim should go to the following area: {Johnson Park}
117
117
---
118
118
Jane Anderson lives in {Oak Hill College Student Dormatory} that has Jane Anderson's room.
119
119
Jane Anderson is currently in {Oak Hill College} that has a classroom, library
120
-
Area options: {Oak Hill College Student Dormatory, The Rose and Crown Pub, Hobbs Cafe, Oak Hill College, Johnson Park, Harvey Oak Supply Store, The Willows Market and Pharmacy}.
120
+
Area options: {Oak Hill College Student Dormatory, The Rose and Crown Pub, Hobbs Cafe, Oak Hill College, Johnson Park, Harvey Oak Supply Store, The Willows Market and Pharmacy}.
121
121
* Stay in the current area if the activity can be done there. Only go out if the activity needs to take place in another place.
122
122
* Must be one of the "Area options," verbatim.
123
123
For eating dinner, Jane Anderson should go to the following area: {Hobbs Cafe}
s+="""Task -- choose an appropriate area from the area options for a task at hand.
170
+
s+="""Task -- choose an appropriate area from the area options for a task at hand.
171
171
Sam Kim lives in {Sam Kim's house} that has Sam Kim's room, bathroom, kitchen.
172
-
Sam Kim is currently in {Sam Kim's house} that has Sam Kim's room, bathroom, kitchen.
172
+
Sam Kim is currently in {Sam Kim's house} that has Sam Kim's room, bathroom, kitchen.
173
173
Area options: {Sam Kim's house, The Rose and Crown Pub, Hobbs Cafe, Oak Hill College, Johnson Park, Harvey Oak Supply Store, The Willows Market and Pharmacy}.
174
174
* Stay in the current area if the activity can be done there. Only go out if the activity needs to take place in another place.
175
175
* Must be one of the "Area options," verbatim.
176
176
For taking a walk, Sam Kim should go to the following area: {Johnson Park}
177
177
---
178
178
Jane Anderson lives in {Oak Hill College Student Dormatory} that has Jane Anderson's room.
179
179
Jane Anderson is currently in {Oak Hill College} that has a classroom, library
180
-
Area options: {Oak Hill College Student Dormatory, The Rose and Crown Pub, Hobbs Cafe, Oak Hill College, Johnson Park, Harvey Oak Supply Store, The Willows Market and Pharmacy}.
180
+
Area options: {Oak Hill College Student Dormatory, The Rose and Crown Pub, Hobbs Cafe, Oak Hill College, Johnson Park, Harvey Oak Supply Store, The Willows Market and Pharmacy}.
181
181
* Stay in the current area if the activity can be done there. Only go out if the activity needs to take place in another place.
182
182
* Must be one of the "Area options," verbatim.
183
183
For eating dinner, Jane Anderson should go to the following area: {Hobbs Cafe}
@@ -226,7 +226,7 @@ def action_location_object(
226
226
For cooking, Jane Anderson should go to the following area in Jane Anderson's house:
227
227
Answer: {kitchen}
228
228
---
229
-
Tom Watson is in common room in Tom Watson's apartment.
229
+
Tom Watson is in common room in Tom Watson's apartment.
230
230
Tom Watson is going to Hobbs Cafe that has the following areas: {cafe}
231
231
Stay in the current area if the activity can be done there. Never go into other people's rooms unless necessary.
232
232
For getting coffee, Tom Watson should go to the following area in Hobbs Cafe:
@@ -240,7 +240,7 @@ def action_location_object(
240
240
+target_sector_areas
241
241
+"}\n"
242
242
)
243
-
s+="""* Stay in the current area if the activity can be done there.
243
+
s+="""* Stay in the current area if the activity can be done there.
244
244
* NEVER go into other people's rooms unless necessary."""
0 commit comments