From 92e632628a3192a906dce0c49e7b82d5fec06840 Mon Sep 17 00:00:00 2001 From: Parth Chadha Date: Fri, 6 Sep 2024 09:30:03 -0700 Subject: [PATCH] Allow arange to accept tensors; add floordiv operation; allow fill operation to take fill value as tensor --- tripy/tests/integration/test_arange.py | 28 ------------------- .../tripy/frontend/ops/tensor_initializers.py | 1 - 2 files changed, 29 deletions(-) diff --git a/tripy/tests/integration/test_arange.py b/tripy/tests/integration/test_arange.py index 31951e7df..e5a03ec72 100644 --- a/tripy/tests/integration/test_arange.py +++ b/tripy/tests/integration/test_arange.py @@ -12,34 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import cupy as cp import numpy as np diff --git a/tripy/tripy/frontend/ops/tensor_initializers.py b/tripy/tripy/frontend/ops/tensor_initializers.py index 20af5aa8e..cc561f73c 100644 --- a/tripy/tripy/frontend/ops/tensor_initializers.py +++ b/tripy/tripy/frontend/ops/tensor_initializers.py @@ -392,7 +392,6 @@ def arange(stop: numbers.Number, dtype: "tripy.dtype" = datatype.float32) -> "tr assert (cp.from_dlpack(output).get() == np.arange(5, dtype=np.float32)).all() """ from tripy.common.datatype import int64 - from tripy.frontend.tensor import Tensor if dtype == int64: raise_error("Known issue with i64. Arange currently does not work with int64 inputs. Issue #116")