Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
stemann committed Dec 1, 2024
1 parent caf261a commit fa02b9e
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions T/Torch/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ if [[ $bb_full_target == *cuda* ]]; then
cuda_version_major=`echo $cuda_version | cut -d . -f 1`
cuda_version_minor=`echo $cuda_version | cut -d . -f 2`
export CUDA_PATH="$prefix/cuda"
export CUDAHOSTCXX=$CXX
mkdir $WORKSPACE/tmpdir
export TMPDIR=$WORKSPACE/tmpdir
cmake_extra_args+="\
Expand Down Expand Up @@ -181,7 +180,6 @@ configure() {
if [[ $bb_full_target != *cuda* ]]; then
configure
else
configure
configure || configure
fi
cmake --build . -- -j $nproc
Expand All @@ -204,6 +202,19 @@ filter!(p -> arch(p) != "armv7l", platforms) # armv7l is not supported by XNNPAC
filter!(p -> arch(p) != "powerpc64le", platforms) # PowerPC64LE is not supported by XNNPACK
filter!(!Sys.isfreebsd, platforms) # Build fails: Clang v12 crashes compiling aten/src/ATen/native/cpu/MaxUnpoolKernel.cpp.

let cuda_platforms = CUDA.supported_platforms(min_version=v"10.2", max_version=v"11")
filter!(p -> arch(p) != "aarch64", cuda_platforms) # Cmake toolchain breaks on aarch64
push!(cuda_platforms, Platform("x86_64", "Linux"; cuda = "11.3"))

# Tag non-CUDA platforms matching CUDA platforms with cuda="none"
for platform in platforms, cuda_platform in cuda_platforms
if platforms_match(platform, cuda_platform)
platform["cuda"] = "none"
end
end
append!(platforms, cuda_platforms)
end

accelerate_platforms = [
Platform("aarch64", "macos"),
Platform("x86_64", "macos"),
Expand All @@ -219,15 +230,6 @@ mkl_platforms = Platform[

openblas_platforms = filter(p -> p union(mkl_platforms, accelerate_platforms), platforms)

let cuda_platforms = CUDA.supported_platforms(min_version=v"10.2", max_version=v"11")
filter!(p -> arch(p) != "aarch64", cuda_platforms) # Cmake toolchain breaks on aarch64
push!(cuda_platforms, Platform("x86_64", "Linux"; cuda = "11.3"))
cuda_platforms = expand_cxxstring_abis(cuda_platforms)

append!(platforms, cuda_platforms)
end
@show platforms

platforms = expand_cxxstring_abis(platforms)
accelerate_platforms = expand_cxxstring_abis(accelerate_platforms)
mkl_platforms = expand_cxxstring_abis(mkl_platforms)
Expand Down Expand Up @@ -259,10 +261,7 @@ requested_platforms = filter(arg -> !occursin(r"^--.*", arg), ARGS)

builds = []
for platform in platforms
if !iszero(length(requested_platforms)) && !(triplet(platform) in requested_platforms)
continue
end
@show platform
should_build_platform(platform) || continue
additional_deps = BinaryBuilder.AbstractDependency[]
if haskey(platform, "cuda")
if platform["cuda"] == "11.3"
Expand Down

0 comments on commit fa02b9e

Please sign in to comment.