Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC/CUDA: fix build with 12.2 and older arch #847

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/ec/cuda/kernel/ec_cuda_half_sm52.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
* We copy-pasted and modify cuda_fp16.hpp because half operators are only available
* for SM>=5.3 but we need to support earlier architectures. On earlier architectures,
* we emulate the operators by converting half to float, do the operation, then convert
* the result back to half
* the result back to half.
* Since CUDA 12.2 similar functionality was added to cuda_fp16.hpp
*/

#pragma once
Expand All @@ -23,7 +24,7 @@

/* Arithmetic FP16 operations in cuda_fp16.hpp only supported on arch >= 5.3,
* however, we support early architectures*/
#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ < 530)
#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ < 530) && (CUDA_VERSION < 12020)
#if !defined(__CUDA_NO_HALF_OPERATORS__)

/* Some basic arithmetic operations expected of a builtin */
Expand Down
Loading