Skip to content

Commit

Permalink
fix msvc build
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhangzz committed Jan 1, 2025
1 parent 54df9f1 commit 5266f27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/turbomind/engine/request.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include <atomic>
#include <cstdint>
#include <functional>
#include <memory>
#include <ostream>

#include "src/turbomind/utils/Tensor.h"
Expand Down Expand Up @@ -107,7 +109,8 @@ struct Request {

int ec; // set when disabling conflicting requests

enum {
enum
{
kOk = 0,
kInvalid = 1, // Sequence not exist or both `start` & `stop` (instead of `end`) is set
kConflict = 2, // Concurrent requests to the same sequence
Expand Down
7 changes: 4 additions & 3 deletions src/turbomind/kernels/sampling_topp_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "3rdparty/cub/cub.cuh"
#endif

#include "src/turbomind/kernels/core/math.h"
#include "src/turbomind/kernels/reduce_kernel_utils.cuh"
#include "src/turbomind/kernels/sampling_topp_kernels.h"
#include "src/turbomind/utils/constant.h"
Expand Down Expand Up @@ -216,9 +217,9 @@ void invokeTopPSort(TopPSortParams& params, cudaStream_t stream)
size_t topp_id_val_buf_size = sizeof(int) * params.batch_size * params.vocab_size_padded;
size_t begin_offset_buf_size = sizeof(int) * params.batch_size;
size_t end_offset_buf_size = sizeof(int) * params.batch_size;
topp_id_val_buf_size = div_up(topp_id_val_buf_size, 256UL) * 256;
begin_offset_buf_size = div_up(begin_offset_buf_size, 256UL) * 256;
end_offset_buf_size = div_up(end_offset_buf_size, 256UL) * 256;
topp_id_val_buf_size = div_up<size_t>(topp_id_val_buf_size, 256) * 256;
begin_offset_buf_size = div_up<size_t>(begin_offset_buf_size, 256) * 256;
end_offset_buf_size = div_up<size_t>(end_offset_buf_size, 256) * 256;

if (params.workspace == nullptr) {
size_t cub_temp_storage_size;
Expand Down

0 comments on commit 5266f27

Please sign in to comment.