Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Jul 3, 2024
1 parent 4c14886 commit d5379c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux-precompile-aarch64-cuda-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
env:
OPENCV_VER: "4.10.0"
MIX_ENV: prod
ELIXIR_VERSION: "1.16.1"
OTP_VERSION: "25.3.2.12"
ELIXIR_VERSION: "1.16"
OTP_VERSION: "25"
NIF_VERSION: "2.16"
EVISION_PREFER_PRECOMPILED: "false"
EVISION_GENERATE_LANG: "erlang,elixir"
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.OTP_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}

- name: Download CUDA and cudnn Installer for Linux Ubuntu aarch64-jetson
Expand Down
12 changes: 7 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,11 @@ defmodule Mix.Tasks.Compile.EvisionPrecompiled do
Path.join([build_path, "lib", "#{app}", "priv"])
end

def prepare(target, os, version, nif_version, enable_contrib, enable_cuda, cuda_version) do
name = filename(target, version, nif_version, enable_contrib, enable_cuda, cuda_version)
def prepare(target, os, version, nif_version, enable_contrib, enable_cuda, cuda_version, cudnn_version) do
name = filename(target, version, nif_version, enable_contrib, enable_cuda, cuda_version, cudnn_version)

filename =
filename(target, version, nif_version, enable_contrib, enable_cuda, cuda_version, ".tar.gz")
filename(target, version, nif_version, enable_contrib, enable_cuda, cuda_version, cudnn_version, ".tar.gz")

cache_dir = cache_dir()
cache_file = Path.join([cache_dir, filename])
Expand Down Expand Up @@ -814,8 +814,10 @@ defmodule Mix.Tasks.Compile.EvisionPrecompiled do
nif_version = get_compile_nif_version()
enable_contrib = System.get_env("EVISION_ENABLE_CONTRIB", "true") == "true"
enable_cuda = System.get_env("EVISION_ENABLE_CUDA", "false") == "true"
cuda_version = System.get_env("EVISION_CUDA_VERSION", Metadata.default_cuda_version())
prepare(target, os, version, nif_version, enable_contrib, enable_cuda, cuda_version)
{default_cuda_version, default_cudnn_version} = Metadata.default_cuda_version()
cuda_version = System.get_env("EVISION_CUDA_VERSION", default_cuda_version)
cudnn_version = System.get_env("EVISION_CUDNN_VERSION", default_cudnn_version)
prepare(target, os, version, nif_version, enable_contrib, enable_cuda, cuda_version, cudnn_version)
else
_ ->
raise RuntimeError, "Cannot use precompiled binaries."
Expand Down

0 comments on commit d5379c5

Please sign in to comment.