Skip to content

CUDA 12.8 / Blackwell build fails: ds4_cuda.cu "FLT_MAX" is undefined #667

Description

@joelteply

Building the CUDA backend on CUDA 12.8 (nvidia/cuda:12.8.0-devel-ubuntu24.04, RTX 5090 / sm_120) fails:

ds4_cuda.cu(23467): error: identifier "FLT_MAX" is undefined
ds4_cuda.cu(23821): error: identifier "FLT_MAX" is undefined
ds4_cuda.cu(24024): error: identifier "FLT_MAX" is undefined

Cause: ds4_cuda.cu uses FLT_MAX but includes only <math.h>/<limits.h>; FLT_MAX is declared in <float.h>, which nvcc 12.8 no longer pulls in transitively.

Repro:

docker run --rm --gpus all -v $PWD:/ds4 nvidia/cuda:12.8.0-devel-ubuntu24.04 \
  bash -c "apt-get update && apt-get install -y build-essential && cd /ds4 && make cuda CUDA_ARCH=sm_120"

Fix: add #include <float.h> to ds4_cuda.cu — PR #666.

(Posting the searchable error text so others on newer CUDA toolchains find the one-line fix.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions