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
jerrrrry
infinicore
Commits
c899dc8b
Commit
c899dc8b
authored
Apr 30, 2025
by
zhangyue
Browse files
issue/209: delete N assert
parent
280d942c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
src/infiniop/elementwise/kunlun/elementwise_kunlun_kernel.h
src/infiniop/elementwise/kunlun/elementwise_kunlun_kernel.h
+2
-3
No files found.
src/infiniop/elementwise/kunlun/elementwise_kunlun_kernel.h
View file @
c899dc8b
...
@@ -54,6 +54,8 @@ __device__ void launchOp(
...
@@ -54,6 +54,8 @@ __device__ void launchOp(
size_t
output_index
,
size_t
output_index
,
Args
...
args
)
{
Args
...
args
)
{
static_assert
(
N
==
Op
::
num_inputs
,
"template N is not equal to Op::num_inputs!
\n
"
);
#pragma unroll
#pragma unroll
// Copy inputs to buf
// Copy inputs to buf
for
(
size_t
i
=
0
;
i
<
N
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
N
;
i
++
)
{
...
@@ -87,9 +89,6 @@ __global__ void elementwiseKernel(
...
@@ -87,9 +89,6 @@ __global__ void elementwiseKernel(
const
void
*
const
*
inputs
,
const
void
*
const
*
inputs
,
Args
...
args
)
{
Args
...
args
)
{
// Only support 3 mode elementwise
static_assert
(
N
<
4
,
"elementwise Kernel support mode < 4 calculate"
);
int
cid
=
core_id
();
int
cid
=
core_id
();
int
ncores
=
core_num
();
int
ncores
=
core_num
();
if
(
cid
>=
ncores
)
{
if
(
cid
>=
ncores
)
{
...
...
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