From f9747ad994f34b7653d8b2d9fcc5ec11fb1b1083 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:04:05 +0000 Subject: [PATCH 01/42] test --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 38b677f..d8170e6 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,8 @@ def main(): Pybind11Extension( "tensor_array._ext", sources = glob.glob(os.path.join("cpp", "*.cc")), - include_dirs=["usr/local/include"], - library_dirs=["usr/local/lib", "usr/local/lib64"], + include_dirs=["/usr/local/include"], + library_dirs=["/usr/local/lib", "/usr/local/lib64"], libraries=["tensorarray_core", "tensorarray_layers"], define_macros=[("VERSION_INFO", __version__)], ), From 1d2ac7ea47aa21fe1093da10a8c0f5437070892a Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:11:09 +0000 Subject: [PATCH 02/42] test --- cpp/tensor_bind.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/tensor_bind.cc b/cpp/tensor_bind.cc index 20d4f5b..3de6407 100644 --- a/cpp/tensor_bind.cc +++ b/cpp/tensor_bind.cc @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include From 3a88c1e3cf58eda64650f09698f267f6b49d7fe8 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:27:52 +0000 Subject: [PATCH 03/42] test --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d8170e6..37d4bc7 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ def main(): sources = glob.glob(os.path.join("cpp", "*.cc")), include_dirs=["/usr/local/include"], library_dirs=["/usr/local/lib", "/usr/local/lib64"], - libraries=["tensorarray_core", "tensorarray_layers"], + # libraries=["tensorarray_core", "tensorarray_layers"], define_macros=[("VERSION_INFO", __version__)], ), ] From 009f87cdf7a938892a9c36ba3758eeb0b175a278 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 16 Jul 2025 04:42:09 +0000 Subject: [PATCH 04/42] version 0.0.6 alpha --- .github/workflows/python-publish.yml | 18 ++++++++++++------ pyproject.toml | 2 +- setup.py | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1588e87..b2bf97e 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,6 +18,10 @@ permissions: jobs: release-build: runs-on: ubuntu-latest + strategy: + matrix: + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ "ubuntu-22.04", "ubuntu-22.04-arm" ] steps: - uses: actions/checkout@v4 @@ -31,15 +35,17 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.x" - - - name: Install Build - run: | - # NOTE: put your own distribution build steps here. - python -m pip install build + + - name: Set up QEMU + if: runner.os == 'Linux' && runner.arch == 'X64' + uses: docker/setup-qemu-action@v3 + with: + platforms: all - name: Build wheels uses: pypa/cibuildwheel@v3.0.1 - # env: + env: + CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le' || 'auto' }} with: package-dir: . output-dir: wheelhouse diff --git a/pyproject.toml b/pyproject.toml index 3e1f43a..9474ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] -cuda = "12.9" +cuda = "12.4" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" diff --git a/setup.py b/setup.py index 37d4bc7..e93e3b9 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = "0.0.6-rc1" +__version__ = "0.0.6" def main(): cwd = os.path.dirname(os.path.abspath(__file__)) From 4d18d455bc1d0fe87789f148b6c7e751644ec703 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 16 Jul 2025 04:42:25 +0000 Subject: [PATCH 05/42] version 0.0.6 alpha --- tensor-array-repo/Tensor-Array | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensor-array-repo/Tensor-Array b/tensor-array-repo/Tensor-Array index a42027c..4b2222c 160000 --- a/tensor-array-repo/Tensor-Array +++ b/tensor-array-repo/Tensor-Array @@ -1 +1 @@ -Subproject commit a42027c12122c57a6374ea35a9d22b448ed87586 +Subproject commit 4b2222cbb431c2b776357a18a9dcdb95ead82dc3 From 7031cd84ccc0bdda85756292c4eb14bf015ca600 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 16 Jul 2025 04:46:15 +0000 Subject: [PATCH 06/42] release v0.0.6 --- .github/workflows/python-publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b2bf97e..5e3cc15 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -17,12 +17,11 @@ permissions: jobs: release-build: - runs-on: ubuntu-latest strategy: matrix: # macos-13 is an intel runner, macos-14 is apple silicon os: [ "ubuntu-22.04", "ubuntu-22.04-arm" ] - + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 4ce153fbe3cc8691be20b80a16012e8ac920254c Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 16 Jul 2025 12:37:09 +0700 Subject: [PATCH 07/42] Update pyproject.toml --- pyproject.toml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9474ca0..024a081 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,6 @@ requires = [ "setuptools>=42", "pybind11>=2.6.0", - "cmake>=3.18,<3.29", ] build-backend = "setuptools.build_meta" @@ -11,12 +10,12 @@ skip = [ "pp*", "*-musllinux*", ] -# manylinux-x86_64-image = "manylinux2014" -# manylinux-i686-image = "manylinux2014" -# manylinux-pypy_x86_64-image = "manylinux2014" -# manylinux-aarch64-image = "manylinux2014" -# manylinux-ppc64le-image = "manylinux2014" -# manylinux-s390x-image = "manylinux2014" +manylinux-x86_64-image = "manylinux2014" +manylinux-i686-image = "manylinux2014" +manylinux-pypy_x86_64-image = "manylinux2014" +manylinux-aarch64-image = "manylinux2014" +manylinux-ppc64le-image = "manylinux2014" +manylinux-s390x-image = "manylinux2014" # musllinux_x86_64-image = "musllinux_1_1" # musllinux_i686-image = "musllinux_1_1" # musllinux_aarch64-image = "musllinux_1_1" From d31b9e140c06b9edad967436cfdbec4eaabc09d6 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 16 Jul 2025 12:41:52 +0700 Subject: [PATCH 08/42] Update pyproject.toml --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 024a081..516f7a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,12 +10,12 @@ skip = [ "pp*", "*-musllinux*", ] -manylinux-x86_64-image = "manylinux2014" -manylinux-i686-image = "manylinux2014" -manylinux-pypy_x86_64-image = "manylinux2014" -manylinux-aarch64-image = "manylinux2014" -manylinux-ppc64le-image = "manylinux2014" -manylinux-s390x-image = "manylinux2014" +# manylinux-x86_64-image = "manylinux2014" +# manylinux-i686-image = "manylinux2014" +# manylinux-pypy_x86_64-image = "manylinux2014" +# manylinux-aarch64-image = "manylinux2014" +# manylinux-ppc64le-image = "manylinux2014" +# manylinux-s390x-image = "manylinux2014" # musllinux_x86_64-image = "musllinux_1_1" # musllinux_i686-image = "musllinux_1_1" # musllinux_aarch64-image = "musllinux_1_1" @@ -30,7 +30,7 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] -cuda = "12.4" +cuda = "12.9" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" From bdbe3c94c233cabd10e065aaf9a426c2f9e2ce8b Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 01:38:16 +0700 Subject: [PATCH 09/42] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 516f7a0..f7649e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] -cuda = "12.9" +cuda = "12.4" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" From 78588bc3992caf5f4a63d59de99ed1f3c27093f8 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 01:52:35 +0700 Subject: [PATCH 10/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index 91068fd..7af858a 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -61,7 +61,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. +cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ cmake --build . cmake --install . From 57e3d6cc54f8661a56c9969b8b80ebd94c7f97b7 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:05:00 +0700 Subject: [PATCH 11/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 5e3cc15..5696875 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -21,6 +21,11 @@ jobs: matrix: # macos-13 is an intel runner, macos-14 is apple silicon os: [ "ubuntu-22.04", "ubuntu-22.04-arm" ] + arch: ["auto"] + include: + - os: ubuntu-22.04 + arch: ppc64le + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -36,15 +41,24 @@ jobs: python-version: "3.x" - name: Set up QEMU - if: runner.os == 'Linux' && runner.arch == 'X64' + if: ${{ matrix.arch != "auto" }} uses: docker/setup-qemu-action@v3 with: platforms: all - name: Build wheels + if: ${{ matrix.arch == "auto" }} + uses: pypa/cibuildwheel@v3.0.1 + with: + package-dir: . + output-dir: wheelhouse + config-file: "{package}/pyproject.toml" + + - name: Build wheels + if: ${{ matrix.arch != "auto" }} uses: pypa/cibuildwheel@v3.0.1 env: - CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le' || 'auto' }} + CIBW_ARCHS: ${{ matrix.arch }} with: package-dir: . output-dir: wheelhouse From 65ebf5e8cd9f9d382f7821eb5ff93ee43938296f Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:10:07 +0700 Subject: [PATCH 12/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 5696875..613ae94 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -41,13 +41,13 @@ jobs: python-version: "3.x" - name: Set up QEMU - if: ${{ matrix.arch != "auto" }} + if: ${{ matrix.arch != 'auto' }} uses: docker/setup-qemu-action@v3 with: platforms: all - name: Build wheels - if: ${{ matrix.arch == "auto" }} + if: ${{ matrix.arch == 'auto' }} uses: pypa/cibuildwheel@v3.0.1 with: package-dir: . @@ -55,7 +55,7 @@ jobs: config-file: "{package}/pyproject.toml" - name: Build wheels - if: ${{ matrix.arch != "auto" }} + if: ${{ matrix.arch != 'auto' }} uses: pypa/cibuildwheel@v3.0.1 env: CIBW_ARCHS: ${{ matrix.arch }} From 6e8b862fe9af2c835779a100ad3cce88be482646 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:31:42 +0700 Subject: [PATCH 13/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index 7af858a..99e326f 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -61,7 +61,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ +cmake .. -DCMAKE_CUDA_FLAGS="--allow-unsupported-compiler" cmake --build . cmake --install . From 97ff1f95be88bfd4b943d70ccbcac525b10d3123 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:42:23 +0700 Subject: [PATCH 14/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index 99e326f..91068fd 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -61,7 +61,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. -DCMAKE_CUDA_FLAGS="--allow-unsupported-compiler" +cmake .. cmake --build . cmake --install . From 68225a68a5d63419d1e362ff6ab6248a6127b64a Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:44:03 +0700 Subject: [PATCH 15/42] Update pyproject.toml --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f7649e4..dfcedce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,3 +35,5 @@ temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" +CC = "/usr/bin/gcc" +CXX = "/usr/bin/g++" From 331dde5ba55978a3e68a80863815775c9744238a Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 08:47:33 +0700 Subject: [PATCH 16/42] Update pyproject.toml --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dfcedce..eabc4ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,5 +35,4 @@ temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" -CC = "/usr/bin/gcc" -CXX = "/usr/bin/g++" +NVCC_CCBIN = "${CUDA_PATH}/bin/gcc" From 558a91dbf678b52425f9013c20e7f9d29fd7719f Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 09:03:56 +0700 Subject: [PATCH 17/42] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eabc4ba..173bf86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,4 +35,4 @@ temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" -NVCC_CCBIN = "${CUDA_PATH}/bin/gcc" +CMAKE_CUDA_COMPILER="$(which nvcc)" From c7fcb27f31f7391b63e7d1cffc82ed56abdc8d51 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 09:07:10 +0700 Subject: [PATCH 18/42] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 173bf86..076b117 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,4 +35,4 @@ temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" -CMAKE_CUDA_COMPILER="$(which nvcc)" +CMAKE_CUDA_COMPILER="${CUDA_PATH}/bin/nvcc)" From 47bb4a1d280c4a6a3aa0650bc6e422110f0ffdcf Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 09:09:44 +0700 Subject: [PATCH 19/42] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 076b117..f7649e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,4 +35,3 @@ temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" -CMAKE_CUDA_COMPILER="${CUDA_PATH}/bin/nvcc)" From cb8309e5d98055dc110de9e6bc4c631e20cf8935 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 09:11:22 +0700 Subject: [PATCH 20/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index 91068fd..dd878fc 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -61,7 +61,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. +cmake .. -DCMAKE_CUDA_COMPILER="$(which nvcc)" cmake --build . cmake --install . From ccfc152f0b6a5198cdccef3271d8436658786683 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 09:31:34 +0700 Subject: [PATCH 21/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index dd878fc..ddabc9e 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -61,7 +61,9 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. -DCMAKE_CUDA_COMPILER="$(which nvcc)" +cmake .. \ +-DCMAKE_C_COMPILER="${CUDA_PATH}/bin/gcc" \ +-DCMAKE_CXX_COMPILER="${CUDA_PATH}/bin/g++" cmake --build . cmake --install . From eb83f53cd10bf5eb0b45c3c4102a5601717d9191 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 09:50:08 +0700 Subject: [PATCH 22/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index ddabc9e..951bf0a 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -62,8 +62,9 @@ cd build # Configure the build with CMake echo "Configuring the build with CMake..." cmake .. \ --DCMAKE_C_COMPILER="${CUDA_PATH}/bin/gcc" \ --DCMAKE_CXX_COMPILER="${CUDA_PATH}/bin/g++" +-DCMAKE_C_COMPILER="/usr/bin/gcc" \ +-DCMAKE_CXX_COMPILER="/usr/bin/g++" \ +-DCMAKE_CUDA_COMPILER="$(which nvcc)" cmake --build . cmake --install . From f4610a2c87417dff630c8e01e45417f71c95dad6 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:33:33 +0700 Subject: [PATCH 23/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index 951bf0a..a9f51d8 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -57,6 +57,7 @@ then else echo "Build directory already exists." fi + # Change to the build directory cd build # Configure the build with CMake @@ -64,7 +65,8 @@ echo "Configuring the build with CMake..." cmake .. \ -DCMAKE_C_COMPILER="/usr/bin/gcc" \ -DCMAKE_CXX_COMPILER="/usr/bin/g++" \ --DCMAKE_CUDA_COMPILER="$(which nvcc)" +-DCMAKE_CUDA_COMPILER="$(which nvcc)" \ +-DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc" cmake --build . cmake --install . From acccec0185c61f3394d90ca606f3d692b3bee8bd Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:43:25 +0700 Subject: [PATCH 24/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index a9f51d8..fd9f1f5 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -66,7 +66,7 @@ cmake .. \ -DCMAKE_C_COMPILER="/usr/bin/gcc" \ -DCMAKE_CXX_COMPILER="/usr/bin/g++" \ -DCMAKE_CUDA_COMPILER="$(which nvcc)" \ --DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc" +-DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc --default-stream per-thread" cmake --build . cmake --install . From 7c6c404f3f3179b99ad497ecd49ab6f144ef421f Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:47:42 +0700 Subject: [PATCH 25/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 613ae94..e7e6e72 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -67,7 +67,7 @@ jobs: - name: Upload distributions uses: actions/upload-artifact@v4 with: - name: release-dists + name: release-dists-${{ runner.os }}-${{ matrix.arch }} path: wheelhouse/ pypi-publish: @@ -94,7 +94,7 @@ jobs: - name: Retrieve release distributions uses: actions/download-artifact@v4 with: - name: release-dists + name: release-dists-* path: wheelhouse/ - name: Publish release distributions to PyPI From feb999fec63ceaa99e9593150bd2dde00b9a5c16 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:04:13 +0700 Subject: [PATCH 26/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index fd9f1f5..a9f51d8 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -66,7 +66,7 @@ cmake .. \ -DCMAKE_C_COMPILER="/usr/bin/gcc" \ -DCMAKE_CXX_COMPILER="/usr/bin/g++" \ -DCMAKE_CUDA_COMPILER="$(which nvcc)" \ --DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc --default-stream per-thread" +-DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc" cmake --build . cmake --install . From 2431756e165706b0082fcb24c6e1cb4f75956c9d Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:05:17 +0700 Subject: [PATCH 27/42] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f7649e4..ceb270c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] -cuda = "12.4" +cuda = "12.2" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" From cbcf8c426922ff87d44b1bb8ec3b4c9ac1ca1273 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:08:48 +0700 Subject: [PATCH 28/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index e7e6e72..1171e69 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -67,7 +67,7 @@ jobs: - name: Upload distributions uses: actions/upload-artifact@v4 with: - name: release-dists-${{ runner.os }}-${{ matrix.arch }} + name: release-dists-${{ runner.os }}-${{ runner.arch }}-${{ matrix.arch }} path: wheelhouse/ pypi-publish: From 88ea0ad8f4b25ff295b2d5ff13fd0ad5334ce4bc Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:15:18 +0700 Subject: [PATCH 29/42] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ceb270c..f7649e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] -cuda = "12.2" +cuda = "12.4" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" From 3bfc95ef3815652e4f5d4ae906ccb94250d4dccf Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:32:08 +0700 Subject: [PATCH 30/42] Update pyproject.toml --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f7649e4..2909580 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,7 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] +SHELL = "/bin/bash" cuda = "12.4" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" From a0ce031b5aee049943e445aaa0baff14d74efcf6 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:37:01 +0700 Subject: [PATCH 31/42] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2909580..f7649e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,6 @@ before-all = [ ] [tool.cibuildwheel.linux.environment] -SHELL = "/bin/bash" cuda = "12.4" temp = "/tmp/cuda-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" From d7aa8bb3d99626360fb799b330e67c681ffe596e Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 11:55:36 +0700 Subject: [PATCH 32/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index a9f51d8..bf9a3d7 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -62,11 +62,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. \ --DCMAKE_C_COMPILER="/usr/bin/gcc" \ --DCMAKE_CXX_COMPILER="/usr/bin/g++" \ --DCMAKE_CUDA_COMPILER="$(which nvcc)" \ --DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc" +cmake .. -DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc" cmake --build . cmake --install . From a58d92b99eda72a2bbf40682371faa13f2460601 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 12:18:48 +0700 Subject: [PATCH 33/42] Update manylinux.sh --- scripts/build-env/manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index bf9a3d7..37adbfc 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -62,7 +62,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. -DCMAKE_CUDA_FLAGS="-ccbin /usr/bin/gcc" +cmake .. -DCMAKE_CUDA_HOST_COMPILER="/usr/bin/gcc" cmake --build . cmake --install . From 4e665ca34d13c7a73b550c03b412792cf273c2b2 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 13:00:21 +0700 Subject: [PATCH 34/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1171e69..1b9ac8d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -94,7 +94,8 @@ jobs: - name: Retrieve release distributions uses: actions/download-artifact@v4 with: - name: release-dists-* + pattern: release-dists-* + merge-multiple: true path: wheelhouse/ - name: Publish release distributions to PyPI From 3daf0dc04479124ca70e3cdfacec4c54316ffd02 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 17 Jul 2025 13:25:50 +0700 Subject: [PATCH 35/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1b9ac8d..199ca8a 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -127,7 +127,7 @@ jobs: - name: Retrieve release distributions uses: actions/download-artifact@v4 with: - name: release-dists + pattern: release-dists-* path: wheelhouse/ - name: Publish release distributions to TestPyPI From dbd091dc46d8f5cec399fd5ef271f463fcad6af1 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:08:32 +0700 Subject: [PATCH 36/42] Update python-publish.yml --- .github/workflows/python-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 199ca8a..14e6402 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -128,6 +128,7 @@ jobs: uses: actions/download-artifact@v4 with: pattern: release-dists-* + merge-multiple: true path: wheelhouse/ - name: Publish release distributions to TestPyPI @@ -136,3 +137,4 @@ jobs: repository-url: https://test.pypi.org/legacy/ packages-dir: wheelhouse/ + From aa3dfc811d98f689f3a460d8c2a47397f279bd72 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 6 Aug 2025 12:13:01 +0700 Subject: [PATCH 37/42] Update tensor.py --- src/tensor_array/core/tensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tensor_array/core/tensor.py b/src/tensor_array/core/tensor.py index fdab2bb..d479365 100644 --- a/src/tensor_array/core/tensor.py +++ b/src/tensor_array/core/tensor.py @@ -4,9 +4,9 @@ # The Tensor class is designed to be used in a computational graph for automatic differentiation. """ +from __future__ import annotations from .._ext.tensor2 import Tensor as _Tensor from .datatypes import DataTypes -from __future__ import annotations class Tensor(_Tensor): """ From 85813be83d3d22d937aa39f703e8282965046fb1 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Wed, 6 Aug 2025 12:13:33 +0700 Subject: [PATCH 38/42] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e93e3b9..905d4e7 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = "0.0.6" +__version__ = "0.0.7" def main(): cwd = os.path.dirname(os.path.abspath(__file__)) From 3e103b00e4a8dad4d18e02388f1ab52e7d21d657 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Thu, 7 Aug 2025 10:10:29 +0700 Subject: [PATCH 39/42] Delete .devcontainer directory --- .devcontainer/Dockerfile | 8 ------- .devcontainer/devcontainer.json | 40 --------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index acc2b84..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM ghcr.io/tensor-array/tensor-array:master - -# [Optional] Uncomment this section to install additional vcpkg ports. -# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install " - -# [Optional] Uncomment this section to install additional packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 3884093..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,40 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/cpp -{ - "name": "C++", - "build": { - "dockerfile": "Dockerfile" - }, - - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/python:1": {} - }, - - "customizations": { - "vscode": { - "extensions": [ - "ms-vscode.cpptools-extension-pack", - "ms-vscode.cmake-tools" - ] - } - }, - - "hostRequirements": { - "gpu": "optional" - } - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "gcc -v", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} From 30f2cf9870c3ad8b481ac8d98386e550a3982f26 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Sat, 9 Aug 2025 04:07:33 +0000 Subject: [PATCH 40/42] test --- pyproject.toml | 1 + scripts/build-env/manylinux.sh | 2 +- setup.py | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f7649e4..28cd1d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ before-all = [ [tool.cibuildwheel.linux.environment] cuda = "12.4" temp = "/tmp/cuda-temp" +TENSOR_ARRAY_INSTALL_PATH = "/tmp/tensor-array-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" diff --git a/scripts/build-env/manylinux.sh b/scripts/build-env/manylinux.sh index 37adbfc..df2554d 100644 --- a/scripts/build-env/manylinux.sh +++ b/scripts/build-env/manylinux.sh @@ -62,7 +62,7 @@ fi cd build # Configure the build with CMake echo "Configuring the build with CMake..." -cmake .. -DCMAKE_CUDA_HOST_COMPILER="/usr/bin/gcc" +cmake .. -DCMAKE_CUDA_HOST_COMPILER="/usr/bin/gcc" -DCMAKE_INSTALL_PREFIX=${TENSOR_ARRAY_INSTALL_PATH} cmake --build . cmake --install . diff --git a/setup.py b/setup.py index 905d4e7..2b23cd5 100644 --- a/setup.py +++ b/setup.py @@ -7,20 +7,22 @@ from setuptools import setup, find_packages from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = "0.0.7" +__version__ = "0.0.8" def main(): cwd = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(cwd, "README.md"), encoding="utf-8") as f: long_description = f.read() + tensor_array_lib_path = os.environ['TENSOR_ARRAY_INSTALL_PATH'] + ext_modules = [ Pybind11Extension( "tensor_array._ext", sources = glob.glob(os.path.join("cpp", "*.cc")), - include_dirs=["/usr/local/include"], - library_dirs=["/usr/local/lib", "/usr/local/lib64"], - # libraries=["tensorarray_core", "tensorarray_layers"], + include_dirs=[tensor_array_lib_path + "/include"], + library_dirs=[tensor_array_lib_path + "/lib/tensor-array", tensor_array_lib_path + "/lib64/tensor-array"], + libraries=["tensorarray_core", "tensorarray_layers"], define_macros=[("VERSION_INFO", __version__)], ), ] From 71550ac2f13bfb183c45665e937c12ef0e2bc797 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Sat, 9 Aug 2025 04:49:27 +0000 Subject: [PATCH 41/42] test 2 --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 28cd1d5..e9f9bf4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,9 @@ before-all = [ "chmod +x scripts/build-env/manylinux.sh", "scripts/build-env/manylinux.sh" ] +repair-wheel-command = [ + "auditwheel repair -w {dest_dir} --exclude libcudart.so.* --exclude libcublas.so.* --exclude libcublasLt.so.* {wheel}" +] [tool.cibuildwheel.linux.environment] cuda = "12.4" @@ -35,4 +38,4 @@ temp = "/tmp/cuda-temp" TENSOR_ARRAY_INSTALL_PATH = "/tmp/tensor-array-temp" CUDA_PATH = "/usr/local/cuda-${cuda}" PATH = "${PATH}:${CUDA_PATH}/bin" -LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64" +LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${CUDA_PATH}/lib:${CUDA_PATH}/lib64:${TENSOR_ARRAY_INSTALL_PATH}/lib/tensor-array:${TENSOR_ARRAY_INSTALL_PATH}/lib64/tensor-array" From db9de97b83519817195951efd82fc0592684b641 Mon Sep 17 00:00:00 2001 From: Noob <63889503+BigNoobWasTaken@users.noreply.github.com> Date: Sat, 9 Aug 2025 05:41:47 +0000 Subject: [PATCH 42/42] v0.0.9 --- setup.py | 4 ++-- src/tensor_array/core/constants.py | 4 ++-- src/tensor_array/core/datatypes.py | 2 +- src/tensor_array/core/operator.py | 12 ++++++------ src/tensor_array/core/tensor.py | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 2b23cd5..9837ec0 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = "0.0.8" +__version__ = "0.0.9" def main(): cwd = os.path.dirname(os.path.abspath(__file__)) @@ -18,7 +18,7 @@ def main(): ext_modules = [ Pybind11Extension( - "tensor_array._ext", + "tensor_array.tensor2", sources = glob.glob(os.path.join("cpp", "*.cc")), include_dirs=[tensor_array_lib_path + "/include"], library_dirs=[tensor_array_lib_path + "/lib/tensor-array", tensor_array_lib_path + "/lib64/tensor-array"], diff --git a/src/tensor_array/core/constants.py b/src/tensor_array/core/constants.py index 9d01931..3731977 100644 --- a/src/tensor_array/core/constants.py +++ b/src/tensor_array/core/constants.py @@ -17,7 +17,7 @@ def zeros(shape : tuple, dtype : DataTypes = DataTypes.S_INT_32) -> Tensor: Tensor: A tensor filled with zeros. """ - from .._ext.tensor2 import zeros as _zeros + from ..tensor2 import zeros as _zeros return _zeros(shape, dtype) def rand(shape : tuple, seed: int = 0) -> Tensor: @@ -32,5 +32,5 @@ def rand(shape : tuple, seed: int = 0) -> Tensor: Tensor: A tensor filled with random values. """ - from .._ext.tensor2 import rand as _rand + from ..tensor2 import rand as _rand return _rand(shape, seed) diff --git a/src/tensor_array/core/datatypes.py b/src/tensor_array/core/datatypes.py index 228f250..3b9261e 100644 --- a/src/tensor_array/core/datatypes.py +++ b/src/tensor_array/core/datatypes.py @@ -4,7 +4,7 @@ # The DataTypes enum includes types such as BOOL, INT, FLOAT, DOUBLE, and others, which correspond to the data types used in tensors. """ -from .._ext.tensor2 import DataType as _DataType +from ..tensor2 import DataType as _DataType from enum import Enum class DataTypes(Enum): diff --git a/src/tensor_array/core/operator.py b/src/tensor_array/core/operator.py index 9797f48..07e6a68 100644 --- a/src/tensor_array/core/operator.py +++ b/src/tensor_array/core/operator.py @@ -15,7 +15,7 @@ def add(value_1 : Tensor, value_2 : Tensor) -> Tensor: Returns: Tensor: A tensor that is the element-wise sum of value_1 and value_2 """ - from .tensor2 import add as _add + from ..tensor2 import add as _add return _add(value_1, value_2) def divide(value_1 : Tensor, value_2 : Tensor) -> Tensor: @@ -27,7 +27,7 @@ def divide(value_1 : Tensor, value_2 : Tensor) -> Tensor: Returns: Tensor: A tensor that is the element-wise division of value_1 by value_2 """ - from .tensor2 import divide as _divide + from ..tensor2 import divide as _divide return _divide(value_1, value_2) def multiply(value_1 : Tensor, value_2 : Tensor) -> Tensor: @@ -39,7 +39,7 @@ def multiply(value_1 : Tensor, value_2 : Tensor) -> Tensor: Returns: Tensor: A tensor that is the element-wise product of value_1 and value_2 """ - from .tensor2 import multiply as _multiply + from ..tensor2 import multiply as _multiply return _multiply(value_1, value_2) def power(value_1 : Tensor, value_2 : Tensor) -> Tensor: @@ -51,7 +51,7 @@ def power(value_1 : Tensor, value_2 : Tensor) -> Tensor: Returns: Tensor: A tensor that is the element-wise result of value_1 raised to the power of value_2 """ - from .tensor2 import power as _power + from ..tensor2 import power as _power return _power(value_1, value_2) def matmul(value_1 : Tensor, value_2 : Tensor) -> Tensor: @@ -63,7 +63,7 @@ def matmul(value_1 : Tensor, value_2 : Tensor) -> Tensor: Returns: Tensor: A tensor that is the result of matrix multiplication between value_1 and value_2 """ - from .._ext.tensor2 import matmul as _matmul + from ..tensor2 import matmul as _matmul return _matmul(value_1, value_2) def condition(condition_value : Tensor, value_if_true : Tensor, value_if_false : Tensor) -> Tensor: @@ -76,5 +76,5 @@ def condition(condition_value : Tensor, value_if_true : Tensor, value_if_false : Returns: Tensor: A tensor that is either value_if_true or value_if_false, depending on the condition. """ - from .._ext.tensor2 import condition as _condition + from ..tensor2 import condition as _condition return _condition(condition_value, value_if_true, value_if_false) diff --git a/src/tensor_array/core/tensor.py b/src/tensor_array/core/tensor.py index d479365..453637a 100644 --- a/src/tensor_array/core/tensor.py +++ b/src/tensor_array/core/tensor.py @@ -5,7 +5,7 @@ """ from __future__ import annotations -from .._ext.tensor2 import Tensor as _Tensor +from ..tensor2 import Tensor as _Tensor from .datatypes import DataTypes class Tensor(_Tensor):