@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / dac6a3f6ed
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 01:45 UTC

[Misc] Apply a couple g++ cleanups (#4719)

Steve Grubb committed May 10, 2024 at 09:37 UTC dac6a3f6ed14ea4061b672f9290bfdf8bcdd996d
2 files changed +1 -2
csrc/cpu/cache.cpp
+1 -1
@@ -84,7 +84,7 @@ void reshape_and_cache_cpu_impl(
84 void copy_blocks(std::vector<torch::Tensor> &key_caches,
85 std::vector<torch::Tensor> &value_caches,
86 const torch::Tensor& block_mapping) {
87 - int num_layers = key_caches.size();
87 + unsigned num_layers = key_caches.size();
88 TORCH_CHECK(num_layers == value_caches.size());
89 if (num_layers == 0) {
90 return;
csrc/cpu/pos_encoding.cpp
-1
@@ -19,7 +19,6 @@ void rotary_embedding_impl(
19 const int num_tokens) {
20 using scalar_vec_t = vec_op::vec_t<scalar_t>;
21 constexpr int VEC_ELEM_NUM = scalar_vec_t::get_elem_num();
22 - constexpr int ELEM_SIZE = sizeof(scalar_t);
22
23 const int embed_dim = rot_dim / 2;
24 TORCH_CHECK(embed_dim % VEC_ELEM_NUM == 0);