NVIDIA / NVIDIA/TensorRT-LLM

Register ENABLE_FP4 as a cmake option

Open
#3,546 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Model optimization Testing
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

System Info

x86_64
cuda 12.4

Who can help?

@tongyuantongyu @byshiue

Information
  • The official example scripts
  • My own modified scripts
Tasks
  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)
Reproduction

install cuda 12.4
cmake ..
make

Expected behavior

compilation success

actual behavior
[  2%] Building CXX object tensorrt_llm/common/CMakeFiles/common_src.dir/opUtils.cpp.o
In file included from cpp/tensorrt_llm/kernels/cutlass_kernels/fpA_intB_gemm/fpA_intB_gemm_template.h:40,
                 from cpp/tensorrt_llm/kernels/cutlass_kernels/fpA_intB_gemm/bf16_int4_gemm_fg_scalebias.cu:17:
 cpp/tensorrt_llm/kernels/cutlass_kernels/cutlass_type_conversion.h:31:10: 
 fatal error: cuda_fp4.h: No such file or directory
   31 | #include <cuda_fp4.h>
      |          ^~~~~~~~~~~~
compilation terminated.

It s just because cutlass_type_conversion.h does not listen to the ENABLE_FP4 define.

additional notes

Would you mind if I register ENABLE_FP4 as a cmake option (default ON) ?

@tongyuantongyu

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cpp/tensorrt_llm/kernels/cutlass_kernels/cutlass_type_conversion.h and inspect how ENABLE_FP4 is handled during the cmake .. configuration. Locate the CMake entry point that defines build options, register ENABLE_FP4 there, then run cmake .. and make to verify compilation no longer unconditionally requires cuda_fp4.h.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.