Skip to content

Commit

Permalink
support c++11/c++14 compile
Browse files Browse the repository at this point in the history
  • Loading branch information
evanzhen authored and rhdong committed Sep 22, 2023
1 parent 8354680 commit 433eff8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions include/merlin/core_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

#pragma once

#include "merlin/allocator.cuh"
#include "merlin/core_kernels/accum_or_assign.cuh"
#include "merlin/core_kernels/find_or_insert.cuh"
#include "merlin/core_kernels/find_ptr_or_insert.cuh"
#include "merlin/core_kernels/kernel_utils.cuh"
#include "merlin/core_kernels/lookup.cuh"
#include "merlin/core_kernels/lookup_ptr.cuh"
#include "merlin/core_kernels/update.cuh"
#include "merlin/core_kernels/update_score.cuh"
#include "merlin/core_kernels/upsert.cuh"
#include "merlin/core_kernels/upsert_and_evict.cuh"
#include "allocator.cuh"
#include "core_kernels/accum_or_assign.cuh"
#include "core_kernels/find_or_insert.cuh"
#include "core_kernels/find_ptr_or_insert.cuh"
#include "core_kernels/kernel_utils.cuh"
#include "core_kernels/lookup.cuh"
#include "core_kernels/lookup_ptr.cuh"
#include "core_kernels/update.cuh"
#include "core_kernels/update_score.cuh"
#include "core_kernels/upsert.cuh"
#include "core_kernels/upsert_and_evict.cuh"

namespace nv {
namespace merlin {
Expand Down Expand Up @@ -754,7 +754,7 @@ inline std::tuple<size_t, size_t> dump_kernel_shared_memory_size(
block_size > 0,
"[HierarchicalKV] block_size <= 0, the K-V-S size may be too large!");

return {block_size * sizeof(KVM<K, V, S>), block_size};
return std::make_tuple(block_size * sizeof(KVM<K, V, S>), block_size);
}

template <class K, class V, class S>
Expand Down
4 changes: 2 additions & 2 deletions include/merlin/core_kernels/kernel_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <mutex>
#include <thread>
#include <vector>
#include "merlin/types.cuh"
#include "merlin/utils.cuh"
#include "../types.cuh"
#include "../utils.cuh"

using namespace cooperative_groups;
namespace cg = cooperative_groups;
Expand Down
4 changes: 2 additions & 2 deletions include/merlin/group_lock.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <mutex>
#include <system_error>
#include <thread>
#include "merlin/core_kernels/group_lock_kernels.cuh"
#include "merlin/utils.cuh"
#include "core_kernels/group_lock_kernels.cuh"
#include "utils.cuh"

namespace nv {
namespace merlin {
Expand Down
4 changes: 2 additions & 2 deletions include/merlin/memory_pool.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class MemoryPool final {
inline StaticWorkspace(pool_type* pool, size_t requested_buffer_size,
cudaStream_t stream)
: base_type(pool, stream) {
auto& buffers{this->buffers_};
auto& buffers = this->buffers_;
this->buffer_size_ = pool->get_raw(buffers.begin(), buffers.end(),
requested_buffer_size, stream);
}
Expand Down Expand Up @@ -333,7 +333,7 @@ class MemoryPool final {
inline DynamicWorkspace(pool_type* pool, size_t n,
size_t requested_buffer_size, cudaStream_t stream)
: base_type(pool, stream) {
auto& buffers{this->buffers_};
auto& buffers = this->buffers_;
buffers.resize(n);
this->buffer_size_ = pool->get_raw(buffers.begin(), buffers.end(),
requested_buffer_size, stream);
Expand Down

0 comments on commit 433eff8

Please sign in to comment.