Remove cudainfo and amd-uprof from crossSet #210

Manually merged
abonerib merged 3 commits from abonerib/jungle:cross-filter into master 2025-10-31 11:27:37 +01:00
3 changed files with 15 additions and 7 deletions

View File

@ -101,14 +101,16 @@ let
pkgsTopLevel = filterAttrs (_: isDerivation) bscPkgs; pkgsTopLevel = filterAttrs (_: isDerivation) bscPkgs;
# Native build in that platform doesn't imply cross build works # Native build in that platform doesn't imply cross build works
canCrossCompile = platform: pkg: canCrossCompile = platform: default: pkg:
(isDerivation pkg) && (isDerivation pkg) &&
# Must be defined explicitly # If meta.cross is undefined, use default
(pkg.meta.cross or false) && (pkg.meta.cross or default) &&
(meta.availableOn platform pkg); (meta.availableOn final.pkgsCross.${platform}.stdenv.hostPlatform pkg);
# For now only RISC-V # For now only RISC-V
crossSet = { riscv64 = final.pkgsCross.riscv64.bsc.pkgsTopLevel; }; crossSet = genAttrs [ "riscv64" ] (platform:
filterAttrs (_: canCrossCompile platform true)
final.pkgsCross.${platform}.bsc.pkgsTopLevel);
buildList = name: paths: buildList = name: paths:
rarias marked this conversation as resolved Outdated

IIUC this is adding packages with cross = false (or not set). Not sure if we want to keep both crossSet and crossList the same. In that case, using canCrossCompile may be handy.

In any case, I would place genCross before crossSet so it is defined before referenced.

IIUC this is adding packages with `cross = false` (or not set). Not sure if we want to keep both crossSet and crossList the same. In that case, using canCrossCompile may be handy. In any case, I would place genCross before crossSet so it is defined before referenced.

You are correct, I think crossSet should be all the packages that should theoretically be possible to cross-compile (opt-out) and crossList should the subset that we care about and are used in the CI so we don't introduce regressions (opt-in).

From hydra, I can monitor crossSet status and keep track of why some packages fail to cross compile and work on fixing them. I have a branch which fixes mpich, once that is fixed, only clangOmpss2, tagaspi, mcxx and paraver will remain broken.

You are correct, I think `crossSet` should be all the packages that should theoretically be possible to cross-compile (opt-out) and `crossList` should the subset that we care about and are used in the CI so we don't introduce regressions (opt-in). From hydra, I can monitor `crossSet` status and keep track of why some packages fail to cross compile and work on fixing them. I have a branch which fixes mpich, once that is fixed, only clangOmpss2, tagaspi, mcxx and paraver will remain broken.

I would like to keep the simple idea that either cross-compilation for a package works (for the pinned commit) and is maintained with cross=true or is broken (even if its is not).

I assume with hydra you will be testing newer commits, which will add substantial maintenance burden, and currently, many extra packages. Do we want to make the set of packages tested by hydra be larger than the ones where we have cross=true? Wouldn't make more sense to use the same set for both?

I would like to keep the simple idea that either cross-compilation for a package works (for the pinned commit) and is maintained with `cross=true` or is broken (even if its is not). I assume with hydra you will be testing newer commits, which will add substantial maintenance burden, and currently, many extra packages. Do we want to make the set of packages tested by hydra be larger than the ones where we have `cross=true`? Wouldn't make more sense to use the same set for both?

I assume with hydra you will be testing newer commits

Yes, but, right now I only track select repos (and have excluded cross-compilation entirely for the rolling tests)

Do we want to make the set of packages tested by hydra be larger than the ones where we have cross=true?

Currently, I use hydra to determine what should be put in cross=true and fix any low-hanging fruit.

I think we can wait until after nixpkgs 25.11, and then decide what to do for each package.

That being said, hydra caches build failures, so there is little overhead in having a "big" crossSet since most of the time the derivations won't change.

> I assume with hydra you will be testing newer commits Yes, but, right now I only track select repos (and have excluded cross-compilation entirely for the rolling tests) > Do we want to make the set of packages tested by hydra be larger than the ones where we have `cross=true`? Currently, I use hydra to determine what should be put in `cross=true` and fix any low-hanging fruit. I think we can wait until after nixpkgs 25.11, and then decide what to do for each package. That being said, hydra caches build failures, so there is little overhead in having a "big" crossSet since most of the time the derivations won't change.

Okay, then fine for me.

Okay, then fine for me.
final.runCommandLocal name { } '' final.runCommandLocal name { } ''
@ -128,7 +130,7 @@ let
# For now only RISC-V # For now only RISC-V
crossList = buildList "ci-cross" crossList = buildList "ci-cross"
(filter (filter
(canCrossCompile final.pkgsCross.riscv64.stdenv.hostPlatform) (canCrossCompile "riscv64" false) # opt-in (pkgs with: meta.cross = true)
(builtins.attrValues crossSet.riscv64)); (builtins.attrValues crossSet.riscv64));
in bscPkgs // { in bscPkgs // {

View File

@ -90,7 +90,7 @@ in
meta = { meta = {
description = "Performance analysis tool-suite for x86 based applications"; description = "Performance analysis tool-suite for x86 based applications";
homepage = "https://www.amd.com/es/developer/uprof.html"; homepage = "https://www.amd.com/es/developer/uprof.html";
platforms = lib.platforms.linux; platforms = [ "x86_64-linux" ];
license = lib.licenses.unfree; license = lib.licenses.unfree;
maintainers = with lib.maintainers.bsc; [ rarias varcila ]; maintainers = with lib.maintainers.bsc; [ rarias varcila ];
}; };

View File

@ -1,5 +1,6 @@
{ {
stdenv stdenv
, lib
, cudatoolkit , cudatoolkit
, cudaPackages , cudaPackages
, autoAddDriverRunpath , autoAddDriverRunpath
@ -40,4 +41,9 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
installPhase = "touch $out"; installPhase = "touch $out";
}; };
meta = {
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers.bsc; [ rarias ];
};
}) })