Skip to content

Commit

Permalink
Diable relaxed constexpr for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Aug 29, 2024
1 parent ab1cc40 commit a080f30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function(ConfigureBench BENCH_NAME)
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/benchmarks")
target_include_directories(${BENCH_NAME} PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}")
target_compile_options(${BENCH_NAME} PRIVATE --expt-extended-lambda --expt-relaxed-constexpr -lineinfo)
target_compile_options(${BENCH_NAME} PRIVATE --expt-extended-lambda -lineinfo)
target_link_libraries(${BENCH_NAME} PRIVATE
nvbench::main
pthread
Expand Down
8 changes: 4 additions & 4 deletions include/cuco/utility/key_generator.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <cuco/detail/utility/strong_type.cuh>

#include <cuda/functional>
#include <cuda/std/limits>
#include <cuda/std/span>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
Expand All @@ -35,9 +36,8 @@
#include <thrust/transform.h>
#include <thrust/type_traits/is_execution_policy.h>

#include <time.h>

#include <cstdint>
#include <ctime>
#include <iterator>
#include <tuple>
#include <type_traits>
Expand Down Expand Up @@ -191,7 +191,7 @@ struct dropout_fn {
{
RNG rng;
thrust::uniform_int_distribution<T> non_match_dist{static_cast<T>(num_),
std::numeric_limits<T>::max()};
cuda::std::numeric_limits<T>::max()};
rng.seed(seed);
return non_match_dist(rng);
}
Expand Down Expand Up @@ -246,7 +246,7 @@ class key_generator {
*
* @param seed Seed for the random number generator
*/
key_generator(uint32_t seed = static_cast<uint32_t>(time(nullptr))) : rng_(seed) {}
key_generator(uint32_t seed = static_cast<uint32_t>(std::time(nullptr))) : rng_(seed) {}

/**
* @brief Generates a sequence of random keys in the interval [0, N).
Expand Down

0 comments on commit a080f30

Please sign in to comment.