Skip to content

Commit d7657c2

Browse files
committed
Remove CMake FP8 conditioning
1 parent 7be8c1f commit d7657c2

File tree

3 files changed

+1
-45
lines changed

3 files changed

+1
-45
lines changed

CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,6 @@ endif()
156156
#
157157
get_torch_gpu_compiler_flags(VLLM_GPU_FLAGS ${VLLM_GPU_LANG})
158158

159-
#
160-
# Get supported FP8 format based on GPU arches
161-
#
162-
get_supported_fp8_format(FP8_FORMAT ${VLLM_GPU_LANG} "${VLLM_GPU_ARCHES}")
163-
if(${FP8_FORMAT} STREQUAL "E4M3FN")
164-
message(STATUS "FP8 format: E4M3FN")
165-
list(APPEND VLLM_GPU_FLAGS "-DUSE_CUDA_FP8_FORMAT")
166-
elseif(${FP8_FORMAT} STREQUAL "E4M3FNUZ")
167-
message(STATUS "FP8 format: E4M3FNUZ")
168-
list(APPEND VLLM_GPU_FLAGS "-DUSE_HIP_FP8_FORMAT")
169-
elseif(${FP8_FORMAT} STREQUAL "CONFLICT")
170-
message(FATAL_ERROR "Target architectures support different types of FP8 formats!")
171-
endif()
172-
173159
#
174160
# Set nvcc parallelism.
175161
#

cmake/utils.cmake

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -452,33 +452,3 @@ function (define_gpu_extension_target GPU_MOD_NAME)
452452

453453
install(TARGETS ${GPU_MOD_NAME} LIBRARY DESTINATION ${GPU_DESTINATION} COMPONENT ${GPU_MOD_NAME})
454454
endfunction()
455-
456-
457-
# gfx12xx should not be compiled together with gfx94x (MI300) because they support different types of FP8 format.
458-
# FP8_FORMAT will be returned (E4M3FN / E4M3FNUZ / NONE / CONFLICT)
459-
macro (get_supported_fp8_format FP8_FORMAT GPU_LANG GPU_ARCHES)
460-
set(_USING_CUDA_FP8_FORMAT "FALSE")
461-
set(_USING_HIP_FP8_FORMAT "FALSE")
462-
463-
if (NOT (${GPU_LANG} STREQUAL "HIP"))
464-
set(_USING_CUDA_FP8_FORMAT "TRUE")
465-
else()
466-
foreach (_ARCH ${GPU_ARCHES})
467-
if (_ARCH MATCHES "gfx94.")
468-
set(_USING_HIP_FP8_FORMAT "TRUE")
469-
elseif(_ARCH MATCHES "gfx12..")
470-
set(_USING_CUDA_FP8_FORMAT "TRUE")
471-
endif()
472-
endforeach()
473-
endif()
474-
475-
if ((${_USING_CUDA_FP8_FORMAT} STREQUAL "FALSE") AND (${_USING_HIP_FP8_FORMAT} STREQUAL "FALSE"))
476-
set(FP8_FORMAT "NONE")
477-
elseif((${_USING_CUDA_FP8_FORMAT} STREQUAL "FALSE") AND (${_USING_HIP_FP8_FORMAT} STREQUAL "TRUE"))
478-
set(FP8_FORMAT "E4M3FNUZ")
479-
elseif((${_USING_CUDA_FP8_FORMAT} STREQUAL "TRUE") AND (${_USING_HIP_FP8_FORMAT} STREQUAL "FALSE"))
480-
set(FP8_FORMAT "E4M3FN")
481-
else()
482-
set(FP8_FORMAT "CONFLICT")
483-
endif()
484-
endmacro()

csrc/quantization/fp8/common.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <cmath>
66
#include <c10/core/ScalarType.h>
77

8-
#ifdef USE_CUDA_FP8_FORMAT
8+
#ifndef USE_ROCM
99
#include <c10/util/Float8_e4m3fn.h>
1010
#define MAYBE_HOST_DEVICE C10_HOST_DEVICE
1111
#else

0 commit comments

Comments
 (0)