PR to drop encryption support was accepted upstream so we can simplify the build slightly.
Changes from 2.5:
- RDNA 4 support (compressed BVH8, triangle packets, intersectable instances, OBB)
- new generic BVH2 import API
- per-context logger
- removed kernel encryption
- various bug fixes for RDNA 2
- ROCm 7 support
A comment in src/targets/gpu/kernels/include/migraphx/kernels/bit.hpp
contains a Unicode MINUS SIGN instead of ASCII hyphen:
// popcount(~(x | −x))
When EMBED_USE=CArrays, the cmake Embed.cmake mechanism reads source
files as hex and generates char[] arrays. The UTF-8 encoding of U+2212
(0xe2 0x88 0x92) causes a compile error:
constant expression evaluates to 226 which cannot be narrowed
to type 'char' [-Wc++11-narrowing]
Applies:
- fix(rdc): Fix CXXFLAGS clobbering and incompatibility with non-x64 architecture ROCm/rocm-systems#2423
- fix(rdc): use pkg-config to find libcap ROCm/rocm-systems#2424
This is almost all find-and-replace.
I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix
A few files have not been changed in this PR because they would cause rebuilds.
This PR should have 0 rebuilds.
Prior to e720baecf0 (Nov 2023), there was
no global config.rocmSupport, and Blender’s hipSupport param predates
that. Since the global config now exists, defer to that instead.
The closure size of various ROCm packages has also been reduced recently
in 32d957e0cd. At the time I wrote this,
`pkgsRocm.blender` was 3.1 GiB (vs. 2.5 GiB for `pkgs.blender`). So
remove the comment.
Add blender to the rocm release attrs so Hydra will build
`pkgsRocm.blender`.
Failing Hydra build: https://hydra.nixos.org/build/308526977
I'm not sure what exactly caused the failure here, but this patch
from LLVM upstream seems to fix the problem and this regressed right
after the glibc upgrade.
Like with 684545ccda or
0728c6f711, the intention is to provide
cached / binary packages via Hydra for packages depending on rocm.
I regenerated the file using:
```sh
cd pkgs/development/rocm-modules/6
# Warning, this can bring a 32GiB RAM system to its limits:
./release-attrPaths-gen.sh
```
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
- add patch from merged upstream llvm PR:
https://www.github.com/llvm/llvm-project/pull/136133 (previous attempt)
https://www.github.com/llvm/llvm-project/pull/144886
Upstream issue:
https://www.github.com/ROCm/composable_kernel/issues/2887
Fixes build failure of `hipblaslt` with gcc15:
```
In file included from /build/source/projects/hipblaslt/clients/common/src/hipblaslt_init_device.cpp:27:
In file included from /build/source/projects/hipblaslt/clients/common/include/hipblaslt_datatype2string.hpp:29:
In file included from /build/source/projects/hipblaslt/library/src/amd_detail/include/auxiliary.hpp:29:
In file included from /build/source/projects/hipblaslt/library/include/hipblaslt/hipblaslt.h:58:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/hip_bfloat16.h:37:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/amd_detail/amd_hip_bfloat16.h:53:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/hip_runtime.h:62:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/amd_detail/amd_hip_runtime.h:114:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/hip_runtime_api.h:578:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/texture_types.h:47:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/channel_descriptor.h:32:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/amd_detail/amd_channel_descriptor.h:29:
In file included from /nix/store/klmhyss10wmwknlcz7j3h2i4cqrcmnqg-clr-6.4.3/include/hip/amd_detail/amd_hip_vector_types.h:49:
/nix/store/042ckvfbpa2v36v12jd34jnwr274ph5r-gcc-prefix/include/c++/array:219:2:
error: reference to __host__ function '__glibcxx_assert_fail' in __host__ __device__ function
219 | __glibcxx_requires_subscript(__n);
| ^
/nix/store/042ckvfbpa2v36v12jd34jnwr274ph5r-gcc-prefix/include/c++/debug/assertions.h:39:3:
note: expanded from macro '__glibcxx_requires_subscript'
39 | __glibcxx_assert(_N < this->size())
| ^
/nix/store/042ckvfbpa2v36v12jd34jnwr274ph5r-gcc-prefix/include/c++/x86_64-unknown-linux-gnu/bits/c++config.h:658:12:
note: expanded from macro '__glibcxx_assert'
658 | std::__glibcxx_assert_fail(); \
| ^
/build/source/projects/hipblaslt/clients/common/src/hipblaslt_init_device.cpp:135:20: note: called by 'operator()'
135 | return rand_nans[pseudo_random_device(idx) % rand_nans.size()];
| ^
/build/source/projects/hipblaslt/clients/common/src/hipblaslt_init_device.cpp:39:27:
note: called by 'fill_kernel<float, (lambda at /build/source/projects/hipblaslt/clients/common/src/hipblaslt_init_device.cpp:134:55)>'
39 | A[idx + offset] = f(idx + offset);
| ^
/nix/store/042ckvfbpa2v36v12jd34jnwr274ph5r-gcc-prefix/include/c++/x86_64-unknown-linux-gnu/bits/c++config.h:652:3:
note: '__glibcxx_assert_fail' declared here
652 | __glibcxx_assert_fail()
| ^
```
- add patch from upstream commit:
5cc61b714d
Fixes build failure with gcc15:
```
In file included from /build/source/runtime/hsa-runtime/libamdhsacode/amd_elf_image.cpp:43:
/build/source/runtime/hsa-runtime/core/inc/amd_elf_image.hpp:62:15:
error: 'uint64_t' does not name a type
62 | virtual uint64_t type() const = 0;
| ^~~~~~~~
/build/source/runtime/hsa-runtime/core/inc/amd_elf_image.hpp:50:1:
note: 'uint64_t' is defined in header '<cstdint>'; this is probably
fixable by adding '#include <cs>
49 | #include <memory>
+++ |+#include <cstdint>
50 |
```
The list should have been regenerated after adding ROCm support to
onnxruntime, but apparently we forgot.
This will make hydra build the ROCm-flavored Firefox package.
Fixes: #459100
rocblas's closure-size was bloated by around 400MB by a ref to
tensile in an error message string. tensile is used at build time
to build and link kernels, but is not needed at runtime.
Before:
/nix/store/zggwlwji0jca2cvhgl4ick7l3fwlwsfb-rocblas-gfx1030-6.4.3 1.3G
After:
/nix/store/71rz9qm323rzmzgkx31llcsnhd0gkvl3-rocblas-gfx1030-6.4.3 904.5M
Prior to overrideScope support for llvmPackages, LLVMgold-path.patch
would point at a non-overridden LLVM and needed replaced.
Now that we use overrideScope we can drop this patch.
The maintainers field currently expects actual maintainers only, not
entire teams. These can be added via `meta.teams` or via
`<team>.members` for NixOS tests, which don't support teams, yet.
This was used in 4b07aeae16 to get
what was actually a *host* LLVM in practice, when the `buildHost`
LLVM package set was included in the `callPackage` scope used for
libraries. It should no longer be necessary and is now quite confusing.
Uses new overrideScope feature to override base LLVM packages
without risking leaking incorrect non-overridden packages
from the base LLVM version.
To achieve no rebuilds or new attrs:
- Explicit list of packages to expose in an inherit instead
of the entire scope
- Noting where workarounds for lack of overrideScope should
be removed in a followup such as re-attaching a
replaceVars patch or disabling separate tblgen package,
but are kept for now to avoid a rebuild
To avoid a large formatting diff a small helper has
been introduced that allows an overrideScope call with a single
arg, convincing nixfmt not to indent the scope body further.