Commit 4e76a3f
[hipdnn] Warn when conv wgrad/dgrad infers output dims assuming groups=1 (#7263)
Closes #5259.
The two `infer_properties_node()` implementations silently assume
`groups = 1` when computing `dw[1]` / `dx[1]`, which gives the wrong
channel count for grouped convolutions unless the caller passes `dw` /
`dx` shapes explicitly.
This PR makes the assumption visible. Each `infer_properties_node()` now
emits a `HIPDNN_FE_LOG_WARN` describing what was assumed and how to
override it, and the inline comments are rewritten to match. The same
caveat is added as a `@note` on `conv_dgrad` and `conv_wgrad` in
`Graph.hpp` so the limitation shows up in the public docs.
No behavior change for non-grouped convolutions or for callers that pass
explicit `dw` / `dx` dimensions. Grouped convolutions that previously
relied on inference now log a warning; the inferred channel count itself
is unchanged by this PR, since fixing it would require a separate API
discussion.
---------
Co-authored-by: BrianHarrisonAMD <169072757+BrianHarrisonAMD@users.noreply.github.com>1 parent c07faaa commit 4e76a3f
3 files changed
Lines changed: 32 additions & 6 deletions
File tree
- projects/hipdnn/frontend/include/hipdnn_frontend
- node
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2890 | 2890 | | |
2891 | 2891 | | |
2892 | 2892 | | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
2893 | 2899 | | |
2894 | 2900 | | |
2895 | 2901 | | |
| |||
2942 | 2948 | | |
2943 | 2949 | | |
2944 | 2950 | | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
2945 | 2957 | | |
2946 | 2958 | | |
2947 | 2959 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
264 | 271 | | |
265 | 272 | | |
266 | 273 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
260 | 267 | | |
261 | 268 | | |
262 | 269 | | |
| |||
0 commit comments