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
492da459
Commit
492da459
authored
May 17, 2022
by
rocking
Browse files
Add static assert
parent
4af77e1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
include/ck/tensor_operation/gpu/device/device_binary_elementwise.hpp
...tensor_operation/gpu/device/device_binary_elementwise.hpp
+3
-0
No files found.
include/ck/tensor_operation/gpu/device/device_binary_elementwise.hpp
View file @
492da459
...
@@ -78,6 +78,9 @@ struct DeviceBinaryElementwise : public BaseOperator
...
@@ -78,6 +78,9 @@ struct DeviceBinaryElementwise : public BaseOperator
index_t
gridSize
,
index_t
gridSize
,
index_t
threadPerBlock
)
index_t
threadPerBlock
)
{
{
static_assert
(
Dim
==
1
||
Dim
==
2
,
"wrong! DeviceBinaryElementwise not support this dimension"
);
if
constexpr
(
Dim
==
1
)
if
constexpr
(
Dim
==
1
)
return
MakeDescriptor_M0_1d
(
shape
,
stride
,
gridSize
,
threadPerBlock
);
return
MakeDescriptor_M0_1d
(
shape
,
stride
,
gridSize
,
threadPerBlock
);
else
if
constexpr
(
Dim
==
2
)
else
if
constexpr
(
Dim
==
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