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

[nix] bump everything #695

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/cases/blastoise/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,15 @@
"codegen.vfredusum_vs": 122332,
"codegen.vfredmax_vs": 122332,
"codegen.vfredmin_vs": 122332,
"rvv_bench.ascii_to_utf16": 1583717,
"rvv_bench.ascii_to_utf32": 704008,
"rvv_bench.ascii_to_utf16": 1583519,
"rvv_bench.ascii_to_utf32": 704038,
"rvv_bench.byteswap": 3353190,
"rvv_bench.chacha20": 2,
"rvv_bench.mandelbrot": 4056017,
"rvv_bench.memcpy": 2131958,
"rvv_bench.memset": 438601,
"rvv_bench.mergelines": 3337924,
"rvv_bench.memcpy": 2072895,
"rvv_bench.memset": 438920,
"rvv_bench.mergelines": 3347920,
"rvv_bench.poly1305": 2,
"rvv_bench.strlen": 877595,
"rvv_bench.utf8_count": 6340810
"rvv_bench.strlen": 877645,
"rvv_bench.utf8_count": 6339104
}
14 changes: 7 additions & 7 deletions .github/cases/machamp/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@
"codegen.vxor_vx": 63114,
"codegen.vzext_vf2": 39423,
"codegen.vzext_vf4": 6444,
"rvv_bench.ascii_to_utf16": 1460100,
"rvv_bench.ascii_to_utf32": 631209,
"rvv_bench.ascii_to_utf16": 1460027,
"rvv_bench.ascii_to_utf32": 631198,
"rvv_bench.byteswap": 3259012,
"rvv_bench.chacha20": 2,
"rvv_bench.memcpy": 1875735,
"rvv_bench.memset": 244343,
"rvv_bench.mergelines": 3137781,
"rvv_bench.memcpy": 1816404,
"rvv_bench.memset": 244393,
"rvv_bench.mergelines": 3170081,
"rvv_bench.poly1305": 2,
"rvv_bench.strlen": 710445,
"rvv_bench.utf8_count": 5729743
"rvv_bench.strlen": 710643,
"rvv_bench.utf8_count": 5727933
}
14 changes: 7 additions & 7 deletions .github/cases/sandslash/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@
"codegen.vxor_vx": 84861,
"codegen.vzext_vf2": 134897,
"codegen.vzext_vf4": 19825,
"rvv_bench.ascii_to_utf16": 1371573,
"rvv_bench.ascii_to_utf32": 583341,
"rvv_bench.ascii_to_utf16": 1371567,
"rvv_bench.ascii_to_utf32": 583336,
"rvv_bench.byteswap": 3556325,
"rvv_bench.chacha20": 2,
"rvv_bench.memcpy": 1704891,
"rvv_bench.memset": 130507,
"rvv_bench.mergelines": 3038622,
"rvv_bench.memcpy": 1645508,
"rvv_bench.memset": 130492,
"rvv_bench.mergelines": 3095029,
"rvv_bench.poly1305": 2,
"rvv_bench.strlen": 715296,
"rvv_bench.utf8_count": 4797754
"rvv_bench.strlen": 715282,
"rvv_bench.utf8_count": 4795393
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 38 additions & 32 deletions nix/pkgs/buddy-mlir.nix
Original file line number Diff line number Diff line change
@@ -1,49 +1,52 @@
{ cmake, ninja, python3, llvmPackages_16, fetchFromGitHub, fetchpatch }:
# Use clang instead of gcc to build
llvmPackages_16.stdenv.mkDerivation {
{ cmake, ninja, python3, llvmPackages_17, fetchFromGitHub, fetchpatch }:
let
stdenv = llvmPackages_17.stdenv;
bintools = llvmPackages_17.bintools;

buddy-llvm = fetchFromGitHub {
owner = "llvm";
repo = "llvm-project";
rev = "6c59f0e1b0fb56c909ad7c9aad4bde37dc006ae0";
hash = "sha256-bMJJ2q1hSh7m0ewclHOmIe7lOHv110rz/P7D3pw8Uiw=";
};
in
stdenv.mkDerivation {
pname = "buddy-mlir";
version = "unstable-2023-08-28";

srcs = [
# Using git submodule to obtain the llvm source is really slow.
# So here I use GitHub archive to download the sources.
(fetchFromGitHub {
owner = "llvm";
repo = "llvm-project";
rev = "8f966cedea594d9a91e585e88a80a42c04049e6c";
sha256 = "sha256-g2cYk3/iyUvmIG0QCQpYmWj4L2H4znx9KbuA5TvIjrc=";
})
(fetchFromGitHub {
owner = "buddy-compiler";
repo = "buddy-mlir";
rev = "7b420a7c23604de2153b919132a7909f30b2cefb";
sha256 = "sha256-m1eabnPo2XXaw7MREt8j9ORQXUvVuWawpJrt2mi/wzM=";
})
];
sourceRoot = "llvm-project";
version = "unstable-2024-07-18";

src = fetchFromGitHub {
owner = "buddy-compiler";
repo = "buddy-mlir";
rev = "ec8a17969b645f0a0c1a822ffb04192b236b5c88";
hash = "sha256-3ecxei/nkx8sjgVkeQvZMaxr1CQXwhTz8aY1e0I3zBA=";
};
unpackPhase = ''
sourceArray=($srcs)
cp -r ''${sourceArray[0]} llvm-project
cp -r ''${sourceArray[1]} buddy-mlir
# We can only use one-step build now...buddy-mlir have bad build system that always
# assume the build artifacts are inside of the LLVM sources. And it also relies on
# some LLVM Cpp source that are configured to be installed by default.
cp -r ${buddy-llvm} llvm-project
cp -r $src buddy-mlir

# Directories copied from nix store are read only
chmod -R u+w llvm-project buddy-mlir
'';
sourceRoot = "llvm-project";

nativeBuildInputs = [ cmake ninja python3 bintools ];

prePatch = "pushd $NIX_BUILD_TOP/buddy-mlir";
prePatch = "pushd ../buddy-mlir";
patches = [
(fetchpatch {
url = "https://github.com/buddy-compiler/buddy-mlir/pull/193.patch";
sha256 = "sha256-scj3jtxrUGLBpHsQRoYYJ8ijqJ22pRu9RU2k7EPe95A=";
})
url = "https://github.com/buddy-compiler/buddy-mlir/pull/357.patch";
hash = "sha256-ysPcHAkrFJDtHmWVo35Wz6ullIGsP1EedYdJCq4fRX4=";
})
];
postPatch = "popd";

nativeBuildInputs = [ cmake ninja python3 llvmPackages_16.bintools ];

cmakeDir = "../llvm";
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_INSTALL_UTILS=ON"
"-DLLVM_ENABLE_PROJECTS=mlir"
"-DLLVM_TARGETS_TO_BUILD=host;RISCV"
"-DLLVM_ENABLE_ASSERTIONS=ON"
Expand All @@ -53,5 +56,8 @@ llvmPackages_16.stdenv.mkDerivation {
"-DLLVM_EXTERNAL_BUDDY_MLIR_SOURCE_DIR=../../buddy-mlir"
];

checkTarget = "check-mlir check-buddy";
passthru.llvm = buddy-llvm;

# No need to do check, and it also takes too much time to finish.
doCheck = false;
}
8 changes: 4 additions & 4 deletions nix/t1/_sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"chisel": {
"cargoLocks": null,
"date": "2024-07-25",
"date": "2024-07-26",
"extract": null,
"name": "chisel",
"passthru": null,
Expand All @@ -53,11 +53,11 @@
"name": null,
"owner": "chipsalliance",
"repo": "chisel",
"rev": "73e96ea5db53ad176e6a9011fc42c888c901d7e2",
"sha256": "sha256-VvK0NfvXh4oHn2rj2OWTe1zpONt6ReyvhMGDxa3ikE4=",
"rev": "96cc1b7cef892f2dcc65c9dbc85517542a77d412",
"sha256": "sha256-iccWL14hdJ02GbKuQ6PBnylpB61s4JuMw1T/M5ZHqUo=",
"type": "github"
},
"version": "73e96ea5db53ad176e6a9011fc42c888c901d7e2"
"version": "96cc1b7cef892f2dcc65c9dbc85517542a77d412"
},
"chisel-interface": {
"cargoLocks": null,
Expand Down
8 changes: 4 additions & 4 deletions nix/t1/_sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
};
chisel = {
pname = "chisel";
version = "73e96ea5db53ad176e6a9011fc42c888c901d7e2";
version = "96cc1b7cef892f2dcc65c9dbc85517542a77d412";
src = fetchFromGitHub {
owner = "chipsalliance";
repo = "chisel";
rev = "73e96ea5db53ad176e6a9011fc42c888c901d7e2";
rev = "96cc1b7cef892f2dcc65c9dbc85517542a77d412";
fetchSubmodules = false;
sha256 = "sha256-VvK0NfvXh4oHn2rj2OWTe1zpONt6ReyvhMGDxa3ikE4=";
sha256 = "sha256-iccWL14hdJ02GbKuQ6PBnylpB61s4JuMw1T/M5ZHqUo=";
};
date = "2024-07-25";
date = "2024-07-26";
};
chisel-interface = {
pname = "chisel-interface";
Expand Down
2 changes: 1 addition & 1 deletion nix/t1/omreader.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let
./../../common.sc
];
};
millDepsHash = "sha256-vrxTqskAH7H598ZWRC/+KAXOQlQ6f+gL9c0hvD25xOM=";
millDepsHash = "sha256-DQeKTqf+MES5ubORu+SMJEiqpOCXsS7VgxUnSqG12Bs=";
nativeBuildInputs = [ submodules.setupHook ];
};

Expand Down
2 changes: 1 addition & 1 deletion nix/t1/t1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let
./../../common.sc
];
};
millDepsHash = "sha256-vrxTqskAH7H598ZWRC/+KAXOQlQ6f+gL9c0hvD25xOM=";
millDepsHash = "sha256-DQeKTqf+MES5ubORu+SMJEiqpOCXsS7VgxUnSqG12Bs=";
nativeBuildInputs = [ submodules.setupHook ];
};

Expand Down
2 changes: 1 addition & 1 deletion script/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let
./build.sc
];
};
millDepsHash = "sha256-89K7QEq3k50gvs4sbXu7rHajC4tmnQCqB4m5ybBTn6k=";
millDepsHash = "sha256-IXQURecgch/8xUvVefC9fhPP0YCSNp/KwbG8bjRJBwY=";
};

passthru.withLsp = self.overrideAttrs (old: {
Expand Down