Skip to content

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Aug 28, 2025

Summary:
Move the GPU config to the common directory instead of copying it and
enable the intermediate float option in the math library.

Summary:
Move the GPU config to the common directory instead of copying it and
enable the intermediate float option in the math library.
@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2025

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

Summary:
Move the GPU config to the common directory instead of copying it and
enable the intermediate float option in the math library.


Full diff: https://github.com/llvm/llvm-project/pull/155869.diff

2 Files Affected:

  • (renamed) libc/config/gpu/config.json (+1-1)
  • (removed) libc/config/gpu/nvptx/config.json (-45)
diff --git a/libc/config/gpu/amdgpu/config.json b/libc/config/gpu/config.json
similarity index 84%
rename from libc/config/gpu/amdgpu/config.json
rename to libc/config/gpu/config.json
index fa179b849dcf7..434ee042953eb 100644
--- a/libc/config/gpu/amdgpu/config.json
+++ b/libc/config/gpu/config.json
@@ -39,7 +39,7 @@
   },
   "math": {
     "LIBC_CONF_MATH_OPTIMIZATIONS": {
-      "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
+      "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
     }
   }
 }
diff --git a/libc/config/gpu/nvptx/config.json b/libc/config/gpu/nvptx/config.json
deleted file mode 100644
index fa179b849dcf7..0000000000000
--- a/libc/config/gpu/nvptx/config.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  "errno": {
-    "LIBC_CONF_ERRNO_MODE": {
-      "value": "LIBC_ERRNO_MODE_SHARED"
-    }
-  },
-  "threads": {
-    "LIBC_CONF_THREAD_MODE": {
-      "value": "LIBC_THREAD_MODE_SINGLE"
-    }
-  },
-  "printf": {
-    "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
-      "value": true
-    },
-    "LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
-      "value": true
-    },
-    "LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
-      "value": true
-    },
-    "LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
-      "value": false
-    },
-    "LIBC_CONF_PRINTF_DISABLE_STRERROR": {
-      "value": true
-    },
-    "LIBC_CONF_PRINTF_RUNTIME_DISPATCH": {
-      "value": false
-    }
-  },
-  "scanf": {
-    "LIBC_CONF_SCANF_DISABLE_FLOAT": {
-      "value": true
-    },
-    "LIBC_CONF_SCANF_DISABLE_INDEX_MODE": {
-      "value": true
-    }
-  },
-  "math": {
-    "LIBC_CONF_MATH_OPTIMIZATIONS": {
-      "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
-    }
-  }
-}

@jhuber6 jhuber6 merged commit c7df883 into llvm:main Aug 28, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants