Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
[Misc] Apply a couple g++ cleanups (vllm-project#4719)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevegrubb authored and robertgshaw2-redhat committed May 19, 2024
1 parent 4b7644f commit 9aec672
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion csrc/cpu/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void reshape_and_cache_cpu_impl(
void copy_blocks(std::vector<torch::Tensor> &key_caches,
std::vector<torch::Tensor> &value_caches,
const torch::Tensor& block_mapping) {
int num_layers = key_caches.size();
unsigned num_layers = key_caches.size();
TORCH_CHECK(num_layers == value_caches.size());
if (num_layers == 0) {
return;
Expand Down
1 change: 0 additions & 1 deletion csrc/cpu/pos_encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ void rotary_embedding_impl(
const int num_tokens) {
using scalar_vec_t = vec_op::vec_t<scalar_t>;
constexpr int VEC_ELEM_NUM = scalar_vec_t::get_elem_num();
constexpr int ELEM_SIZE = sizeof(scalar_t);

const int embed_dim = rot_dim / 2;
TORCH_CHECK(embed_dim % VEC_ELEM_NUM == 0);
Expand Down

0 comments on commit 9aec672

Please sign in to comment.