Skip to content

Commit 8099a08

Browse files
authored
Try to fix macos (#69)
* Try to fix macos * Try later baselisk * Add caching * try hidden file
1 parent 532abe6 commit 8099a08

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

.buildkite/pipeline.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ steps:
1212
os: "{{matrix.os}}"
1313
arch: "{{matrix.arch}}"
1414
if: build.tag == null
15+
plugins:
16+
- cache#v0.6.0:
17+
manifest: .buildkite/pipeline.yml
18+
path: .local
19+
restore: file
20+
save: file
21+
- cache#v0.6.0:
22+
manifest: WORKSPACE
23+
path: .baztmp
24+
restore: file
25+
save: file
1526
commands: |
1627
mkdir -p .local/bin
1728
export PATH="`pwd`/.local/bin:`pwd`/conda/bin:\$PATH"
@@ -26,17 +37,17 @@ steps:
2637
sed -i.bak 's~targets = \[.*\]~targets = \[\"X86\", \"AMDGPU\"]~g' WORKSPACE
2738
curl -fLO https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-MacOSX-{{matrix.arch}}.sh
2839
fi
29-
curl -fLO "https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-darwin"
40+
curl -fLO "https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-darwin"
3041
mv bazelisk-darwin .local/bin/bazel
3142
chmod +x .local/bin/bazel
3243
chmod +x Miniconda*.sh
3344
./Miniconda*.sh -b -p `pwd`/conda
3445
rm Miniconda*.sh
3546
elif [ "{{matrix.os}}" == "linux" ]; then
3647
if [ "{{matrix.arch}}" == "aarch64" ]; then
37-
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-arm64
48+
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-arm64
3849
else
39-
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64
50+
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64
4051
fi
4152
mv bazel* .local/bin/bazel
4253
chmod +x .local/bin/bazel
@@ -58,12 +69,13 @@ steps:
5869
# conda install -c conda-forge cxx-compiler -y
5970
python -m ensurepip --upgrade
6071
python -m pip install --user numpy wheel
61-
mkdir baztmp
62-
bazel --output_user_root=`pwd`/baztmp build :enzyme_ad
72+
mkdir -p .baztmp
73+
rm -f bazel-bin/*.whl
74+
bazel --output_user_root=`pwd`/.baztmp build :enzyme_ad
6375
cp bazel-bin/*.whl .
6476
python -m pip install *.whl
6577
python -m pip install "jax[cpu]"
66-
bazel --output_user_root=`pwd`/baztmp test --test_output=errors ...
78+
bazel --output_user_root=`pwd`/.baztmp test --test_output=errors ...
6779
artifact_paths:
6880
- "*.whl"
6981

.buildkite/secure_pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ steps:
3333
sed -i.bak 's~targets = \[.*\]~targets = \[\"X86\", \"AMDGPU\"]~g' WORKSPACE
3434
curl -fLO https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-MacOSX-{{matrix.arch}}.sh
3535
fi
36-
curl -fLO "https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-darwin"
36+
curl -fLO "https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-darwin"
3737
mv bazelisk-darwin .local/bin/bazel
3838
chmod +x .local/bin/bazel
3939
chmod +x Miniconda*.sh
4040
./Miniconda*.sh -b -p `pwd`/conda
4141
rm Miniconda*.sh
4242
elif [ "{{matrix.os}}" == "linux" ]; then
4343
if [ "{{matrix.arch}}" == "aarch64" ]; then
44-
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-arm64
44+
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-arm64
4545
else
46-
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64
46+
curl -fLO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64
4747
fi
4848
mv bazel* .local/bin/bazel
4949
chmod +x .local/bin/bazel

src/enzyme_ad/jax/Passes/EnzymeHLOOpt.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3677,10 +3677,11 @@ struct PadDotGeneral : public OpRewritePattern<mlir::stablehlo::DotGeneralOp> {
36773677
SmallVector<int64_t> sliceLow, sliceHigh, sliceStride;
36783678
for (auto &&[pos, size] :
36793679
llvm::enumerate(otherArg.getType().cast<TensorType>().getShape())) {
3680-
auto it = llvm::find_if(otherDimsToSlice, [&](auto &tup) {
3681-
return std::get<0>(tup) == pos;
3682-
});
3683-
if (it == otherDimsToSlice.end()) {
3680+
std::optional<std::tuple<int64_t, int64_t, int64_t, int64_t>> it;
3681+
for (auto tup : otherDimsToSlice)
3682+
if (std::get<0>(tup) == pos)
3683+
it = tup;
3684+
if (!it) {
36843685
sliceLow.push_back(0);
36853686
sliceHigh.push_back(size);
36863687
sliceStride.push_back(1);

0 commit comments

Comments
 (0)