Commit 3069c2b
[rocm-libraries] ROCm/rocm-libraries#6073 (commit a538084)
[hipTensor] Add compiling options for unary ops
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Motivation
Add compiling options for unary ops and make hipTensor compiling fast
## Technical Details
This PR resolves an issue where the introduction of unary ops in
contraction caused hipTensor compile times to increase by 3–4x.
A new compile-time option, HIPTENSOR_INLINE_UNARY_OPS, has been added to
control this behavior. When set to ON, the switch_op method in the
HiptensorUnaryOp class is compiled inline, which was identified as the
root cause of the compile time regression. When set to OFF, switch_op is
compiled with noinline, restoring compile times to their baseline levels
prior to the addition of unary op support.
The default value of HIPTENSOR_INLINE_UNARY_OPS is OFF.
## Test Plan
run normal tests.
test compiling when HIPTENSOR_INLINE_UNARY_OPS is OFF or ON.
## Test Result
all tests passed.
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.1 parent 1b417a5 commit 3069c2b
4 files changed
Lines changed: 26 additions & 8 deletions
File tree
- docs/install
- library/src/include
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
182 | | - | |
| 188 | + | |
183 | 189 | | |
184 | 190 | | |
185 | 191 | | |
| |||
0 commit comments