Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
305b5a09
Commit
305b5a09
authored
Nov 20, 2024
by
zhuwenwen
Browse files
增加input tensor size>2^31支持
parent
1a493a24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
csrc/opt/layernorm_kernels_opt.cu
csrc/opt/layernorm_kernels_opt.cu
+2
-2
No files found.
csrc/opt/layernorm_kernels_opt.cu
View file @
305b5a09
...
@@ -342,7 +342,7 @@ __global__ void fused_add_rms_kernel_opt(scalar_t* input,scalar_t* residual,scal
...
@@ -342,7 +342,7 @@ __global__ void fused_add_rms_kernel_opt(scalar_t* input,scalar_t* residual,scal
scalar_t
intput_vec
[
Vec
];
scalar_t
intput_vec
[
Vec
];
scalar_t
residual_vec
[
Vec
];
scalar_t
residual_vec
[
Vec
];
T_ACC
trstd
;
T_ACC
trstd
;
int
idx
=
i
*
tcol
+
j
;
int
64_t
idx
=
i
*
tcol
+
j
;
idx
*=
Vec
;
idx
*=
Vec
;
if
(
j
<
tcol
)
{
if
(
j
<
tcol
)
{
*
(
LoadT
*
)
intput_vec
=
*
(
LoadT
*
)(
input
+
idx
);
*
(
LoadT
*
)
intput_vec
=
*
(
LoadT
*
)(
input
+
idx
);
...
@@ -381,7 +381,7 @@ __global__ void fused_rms_kernel_opt(scalar_t* input,scalar_t* output,scalar_t*
...
@@ -381,7 +381,7 @@ __global__ void fused_rms_kernel_opt(scalar_t* input,scalar_t* output,scalar_t*
using
LoadT
=
at
::
native
::
memory
::
aligned_vector
<
scalar_t
,
Vec
>
;
using
LoadT
=
at
::
native
::
memory
::
aligned_vector
<
scalar_t
,
Vec
>
;
scalar_t
intput_vec
[
Vec
];
scalar_t
intput_vec
[
Vec
];
T_ACC
trstd
;
T_ACC
trstd
;
int
idx
=
i
*
tcol
+
j
;
int
64_t
idx
=
i
*
tcol
+
j
;
idx
*=
Vec
;
idx
*=
Vec
;
if
(
j
<
tcol
)
{
if
(
j
<
tcol
)
{
*
(
LoadT
*
)
intput_vec
=
*
(
LoadT
*
)(
input
+
idx
);
*
(
LoadT
*
)
intput_vec
=
*
(
LoadT
*
)(
input
+
idx
);
...
...
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