Skip to content

Commit

Permalink
Fix checksum file path to work when running as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Aug 15, 2024
1 parent e2f6968 commit 0e2c513
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/xla.ex
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ defmodule XLA do
end

defp checksum_path() do
Path.join(File.cwd!(), "checksum.txt")
# Note that this path points to the project source, which normally
# may not be available at runtime (in releases). However, we expect
# XLA to be called only during compilation, in which case this path
# is still available
Path.expand("../checksum.txt", __DIR__)
end

defp precompiled_targets(), do: @precompiled_targets
Expand Down

0 comments on commit 0e2c513

Please sign in to comment.