diff --git a/src/finch/julia.py b/src/finch/julia.py index 72e074d..12fddef 100644 --- a/src/finch/julia.py +++ b/src/finch/julia.py @@ -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 ( diff --git a/src/finch/tensor.py b/src/finch/tensor.py index 7b45b01..667aa9f 100644 --- a/src/finch/tensor.py +++ b/src/finch/tensor.py @@ -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)