Skip to content

Commit

Permalink
Move the typedef for fp16 up to cuda_stub.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
achirkin committed Feb 5, 2024
1 parent 27577bb commit 77a296b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion cpp/bench/ann/src/common/cuda_stub.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,6 +33,7 @@ ______________________________________________________________________________
*/

#ifndef BUILD_CPU_ONLY
#include <cuda_fp16.h>
#include <cuda_runtime_api.h>
#ifdef ANN_BENCH_LINK_CUDART
#include <cstring>
Expand All @@ -41,6 +42,7 @@ ______________________________________________________________________________
#else
typedef void* cudaStream_t;
typedef void* cudaEvent_t;
typedef uint16_t half;
#endif

namespace raft::bench::ann {
Expand Down
6 changes: 0 additions & 6 deletions cpp/bench/ann/src/common/dataset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

#include "util.hpp"

#ifndef BUILD_CPU_ONLY
#include <cuda_fp16.h>
#else
typedef uint16_t half;
#endif

#include <errno.h>
#include <sys/mman.h>
#include <sys/stat.h>
Expand Down

0 comments on commit 77a296b

Please sign in to comment.