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
044931f9
Unverified
Commit
044931f9
authored
Aug 21, 2025
by
Elvir Crnčević
Committed by
GitHub
Aug 21, 2025
Browse files
Make sure that vectorize_with_alignment produced vectorized global loads (#23182)
parent
1d353b63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
csrc/quantization/vectorization_utils.cuh
csrc/quantization/vectorization_utils.cuh
+10
-5
No files found.
csrc/quantization/vectorization_utils.cuh
View file @
044931f9
...
...
@@ -41,8 +41,10 @@ __device__ inline void vectorize_with_alignment(
for
(
int
i
=
tid
;
i
<
num_vec
;
i
+=
stride
)
{
vout_t
tmp
;
vec_op
(
tmp
,
v_in
[
i
]);
v_out
[
i
]
=
tmp
;
// Make a local copy of the entire pack
vin_t
src
=
v_in
[
i
];
// <- encourages a single vector ld
vec_op
(
tmp
,
src
);
v_out
[
i
]
=
tmp
;
// <- encourages a single vector st
}
return
;
}
...
...
@@ -71,8 +73,10 @@ __device__ inline void vectorize_with_alignment(
// 2. vectorize the main part
for
(
int
i
=
tid
;
i
<
num_vec
;
i
+=
stride
)
{
vout_t
tmp
;
vec_op
(
tmp
,
v_in
[
i
]);
v_out
[
i
]
=
tmp
;
// Make a local copy of the entire pack
vin_t
src
=
v_in
[
i
];
// <- encourages a single vector ld
vec_op
(
tmp
,
src
);
v_out
[
i
]
=
tmp
;
// <- encourages a single vector st
}
// 3. handle the tail
...
...
@@ -125,7 +129,8 @@ __device__ inline void vectorize_read_with_alignment(const InT* in, int len,
auto
*
v_in
=
reinterpret_cast
<
const
vin_t
*>
(
in
);
for
(
int
i
=
tid
;
i
<
num_vec
;
i
+=
stride
)
{
vec_op
(
v_in
[
i
]);
vin_t
tmp
=
v_in
[
i
];
vec_op
(
tmp
);
}
return
;
}
...
...
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