Skip to content

Commit

Permalink
Hide custom operator overloading since them are already supported in …
Browse files Browse the repository at this point in the history
…CUDA 12 (openvinotoolkit#740)

Co-authored-by: Denis Kotov <[email protected]>
  • Loading branch information
redradist and lohika-denis-kotov authored Oct 9, 2023
1 parent d2944fd commit 4150a62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/nvidia_plugin/src/cuda/float16.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define CUDA_HAS_BF16_MATH
#endif // defined (CUDA_HAS_BF16_TYPE) && (__CUDA_ARCH__ >= 800 || !defined(__CUDA_ARCH__))

#ifdef __CUDACC__
#if defined(__CUDACC__) && CUDA_VERSION < 12000
#if !defined(CUDA_HAS_HALF_MATH)
/* Some basic arithmetic operations expected of a builtin */
__device__ __forceinline__ __half operator+(const __half &lh, const __half &rh) {
Expand Down Expand Up @@ -192,4 +192,4 @@ __device__ __forceinline__ bool operator<=(const __nv_bfloat16 &lh, const __nv_b
return static_cast<float>(lh) <= static_cast<float>(rh);
}
#endif /* defined(CUDA_HAS_BF16_TYPE) && !defined(CUDA_HAS_BF16_MATH) */
#endif // __CUDACC__
#endif // defined(__CUDACC__) && CUDA_VERSION < 12000

0 comments on commit 4150a62

Please sign in to comment.