Skip to content

Commit

Permalink
Merge pull request #69 from willow-ahrens/nightly-build
Browse files Browse the repository at this point in the history
Enable Finch dependency from url
  • Loading branch information
mtsokol authored Jun 12, 2024
2 parents f574105 + 3deafad commit b792600
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/finch/julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
_FINCH_VERSION = "0.6.31"
_FINCH_HASH = "9177782c-1635-4eb9-9bfb-d9dfa25e6bce"
_FINCH_REPO_PATH = os.environ.get("FINCH_REPO_PATH", default=None)
_FINCH_REPO_URL = os.environ.get("FINCH_URL_PATH", default=None)

if _FINCH_REPO_PATH and _FINCH_REPO_URL:
raise ValueError("FINCH_REPO_PATH and FINCH_URL_PATH can't be set at the same time.")

if _FINCH_REPO_PATH: # Also account for empty string
juliapkg.add(_FINCH_NAME, _FINCH_HASH, path=_FINCH_REPO_PATH, dev=True)
elif _FINCH_REPO_URL:
juliapkg.add(_FINCH_NAME, _FINCH_HASH, url=_FINCH_REPO_URL, dev=True)
else:
deps = juliapkg.deps.load_cur_deps()
if (
Expand Down
4 changes: 4 additions & 0 deletions src/finch/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,10 @@ def eye(


def tensordot(x1: Tensor, x2: Tensor, /, *, axes=2) -> Tensor:
if not isinstance(x1, Tensor):
x1 = Tensor(x1)
if not isinstance(x2, Tensor):
x2 = Tensor(x2)
if isinstance(axes, Iterable):
self_axes = normalize_axis_tuple(axes[0], x1.ndim)
other_axes = normalize_axis_tuple(axes[1], x2.ndim)
Expand Down

0 comments on commit b792600

Please sign in to comment.