Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel
Commits
7fb23099
"sgl-kernel/csrc/vscode:/vscode.git/clone" did not exist on "21337b22b960c8bca5410c73ba4f36bfca72443c"
Commit
7fb23099
authored
Nov 04, 2022
by
Qianfeng Zhang
Browse files
Add checking for reduceDims in reference_batchnorm_backward
parent
9f490d1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
library/include/ck/library/reference_tensor_operation/cpu/reference_batchnorm_backward_nhwc_c.hpp
...sor_operation/cpu/reference_batchnorm_backward_nhwc_c.hpp
+3
-1
No files found.
library/include/ck/library/reference_tensor_operation/cpu/reference_batchnorm_backward_nhwc_c.hpp
View file @
7fb23099
...
@@ -59,7 +59,6 @@ struct ReferenceBatchNormBwd_Input_N_H_W_C_Output_C
...
@@ -59,7 +59,6 @@ struct ReferenceBatchNormBwd_Input_N_H_W_C_Output_C
ignore
=
xStrides
;
ignore
=
xStrides
;
ignore
=
dyStrides
;
ignore
=
dyStrides
;
ignore
=
dxStrides
;
ignore
=
dxStrides
;
ignore
=
reduceDims
;
ignore
=
bnScaleStrides
;
ignore
=
bnScaleStrides
;
ignore
=
bnBiasStrides
;
ignore
=
bnBiasStrides
;
ignore
=
bnMeanVarStrides
;
ignore
=
bnMeanVarStrides
;
...
@@ -68,6 +67,9 @@ struct ReferenceBatchNormBwd_Input_N_H_W_C_Output_C
...
@@ -68,6 +67,9 @@ struct ReferenceBatchNormBwd_Input_N_H_W_C_Output_C
bnScaleBiasMeanVarLengths
[
0
]
!=
xyLengths
[
3
])
bnScaleBiasMeanVarLengths
[
0
]
!=
xyLengths
[
3
])
throw
std
::
runtime_error
(
"Invalid tensor dimensions!"
);
throw
std
::
runtime_error
(
"Invalid tensor dimensions!"
);
if
(
reduceDims
[
0
]
!=
0
||
reduceDims
[
1
]
!=
1
||
reduceDims
[
2
]
!=
2
)
throw
std
::
runtime_error
(
"Invalid reduce dimensions!"
);
n_
=
xyLengths
[
0
];
n_
=
xyLengths
[
0
];
h_
=
xyLengths
[
1
];
h_
=
xyLengths
[
1
];
w_
=
xyLengths
[
2
];
w_
=
xyLengths
[
2
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment