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

[FEA]: Add support for new extended floating point types #3558

Open
1 of 5 tasks
davebayer opened this issue Jan 28, 2025 · 0 comments
Open
1 of 5 tasks

[FEA]: Add support for new extended floating point types #3558

davebayer opened this issue Jan 28, 2025 · 0 comments
Labels
feature request New feature or request.

Comments

@davebayer
Copy link
Contributor

davebayer commented Jan 28, 2025

Is this a duplicate?

Area

libcu++

Is your feature request related to a problem? Please describe.

CUDA 12.8 introduced several new extended floating point types:

  • NVFP4
    • __nv_fp4_e2m2
      • This data format is a 4-bit floating point format with 2 bits for exponent and 1 bit for mantissa. The e2m1 encoding does not support infinity and NaN.
  • NVFP6
    • __nv_fp6_e2m3
      • This data format is a 6-bit floating point format with 2 bits for exponent and 3 bits for mantissa. The e2m3 encoding does not support infinity and NaN.
    • __nv_fp6_e3m2
      • This data format is a 6-bit floating point format with 3 bits for exponent and 2 bits for mantissa. The e3m2 encoding does not support infinity and NaN.
  • NVFP8
    • __nv_fp8_e8m0
      • This data format is an 8-bit unsigned floating-point format with 8 bits for exponent and 0 bits for mantissa. The ue8m0 encoding does not support infinity. NaN value is limited to 0xff.

Describe the solution you'd like

  • Add feature macros for NVFP4 and NVFP6 types, similar to NVFP8
  • Specialize cuda::std::numeric_limits for these types
  • Implement overloads in <cuda/std/cmath>
  • Implement specializations of cuda::std::complex

Describe alternatives you've considered

No response

Additional context

No response

@davebayer davebayer added the feature request New feature or request. label Jan 28, 2025
@github-project-automation github-project-automation bot moved this to Todo in CCCL Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request.
Projects
Status: Todo
Development

No branches or pull requests

1 participant