TensorArray 0.0.1a0__tar.gz → 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tensorarray-0.0.2/CMakeLists.txt +29 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/LICENSE +0 -0
- tensorarray-0.0.2/MANIFEST.in +6 -0
- tensorarray-0.0.2/PKG-INFO +33 -0
- tensorarray-0.0.2/README.md +15 -0
- tensorarray-0.0.2/pyproject.toml +7 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/setup.cfg +0 -0
- tensorarray-0.0.2/setup.py +171 -0
- tensorarray-0.0.2/src/TensorArray.egg-info/PKG-INFO +33 -0
- tensorarray-0.0.2/src/TensorArray.egg-info/SOURCES.txt +158 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/TensorArray.egg-info/dependency_links.txt +0 -0
- tensorarray-0.0.2/src/TensorArray.egg-info/top_level.txt +1 -0
- tensorarray-0.0.2/src/tensor_array/_core/tensor_bind.cc +271 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/activation.py +0 -0
- tensorarray-0.0.2/src/tensor_array/core/__init__.py +4 -0
- tensorarray-0.0.2/src/tensor_array/core/constants.py +6 -0
- tensorarray-0.0.2/src/tensor_array/core/datatypes.py +17 -0
- tensorarray-0.0.2/src/tensor_array/core/operator.py +22 -0
- tensorarray-0.0.2/src/tensor_array/core/tensor.py +52 -0
- tensorarray-0.0.2/src/tensor_array/core/tensor2.cpython-38-x86_64-linux-gnu.so +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/__init__.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/attention/attention.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/attention/transformer.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/layer.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/normalization/normalization.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/parameter.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/util/__init__.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/util/activation.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/util/linear.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/util/sequential.py +0 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/CMakeLists.txt +64 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/Config.cmake.in +2 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/LICENSE +201 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/_ +0 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/CMakeLists.txt +46 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/data_type_wrapper.cc +123 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/data_type_wrapper.hh +44 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/devices.cc +238 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/devices.hh +69 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/extern_type_map.cc +30 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/extern_type_map.hh +26 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/initializer_wrapper.hh +64 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor.cc +1061 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor.cu +1004 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor.hh +454 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_blas.cc +218 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_cast.cu +130 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_convolution.cc +88 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_convolution.cu +536 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_reduce.cu +368 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensorarray.hh +109 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensorbase.cc +258 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/core/tensorbase.hh +216 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/CMakeLists.txt +32 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/attention.cc +69 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/attention.hh +42 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/convolution.cc +109 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/convolution.hh +73 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_any.cc +16 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_any.hh +72 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_holder.hh +124 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_impl.cc +75 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_impl.hh +70 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_utility.cc +79 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_utility.hh +56 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/linear.cc +43 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/linear.hh +46 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/normalization.cc +77 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/normalization.hh +41 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/recurrent.cc +114 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/recurrent.hh +62 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/sequential.cc +65 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/sequential.hh +48 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/transformer.cc +95 -0
- tensorarray-0.0.2/tensor-array-repo/Tensor-Array/src/tensor_array/layers/transformer.hh +72 -0
- tensorarray-0.0.2/third_party/pybind11/CMakeLists.txt +423 -0
- tensorarray-0.0.2/third_party/pybind11/LICENSE +29 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/attr.h +722 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/buffer_info.h +208 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/cast.h +2356 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/chrono.h +228 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/common.h +2 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/complex.h +74 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/conduit/README.txt +15 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/conduit/pybind11_conduit_v1.h +116 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/conduit/pybind11_platform_abi_id.h +87 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/conduit/wrap_include_python_h.h +72 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/critical_section.h +56 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/class.h +823 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/common.h +1310 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/cpp_conduit.h +75 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/descr.h +226 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h +39 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/exception_translation.h +71 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/function_record_pyobject.h +208 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/init.h +538 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/internals.h +786 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/native_enum_data.h +209 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/pybind11_namespace_macros.h +82 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/struct_smart_holder.h +378 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/type_caster_base.h +1591 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/typeid.h +65 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/using_smart_holder.h +22 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/detail/value_and_holder.h +90 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/eigen/common.h +9 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/eigen/matrix.h +723 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/eigen/tensor.h +521 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/eigen.h +12 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/embed.h +320 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/eval.h +161 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/functional.h +147 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/gil.h +199 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/gil_safe_call_once.h +102 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/gil_simple.h +37 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/iostream.h +265 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/native_enum.h +67 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/numpy.h +2312 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/operators.h +202 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/options.h +92 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/pybind11.h +3584 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/pytypes.h +2680 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/stl/filesystem.h +114 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/stl.h +666 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/stl_bind.h +858 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/subinterpreter.h +305 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/trampoline_self_life_support.h +65 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/typing.h +298 -0
- tensorarray-0.0.2/third_party/pybind11/include/pybind11/warnings.h +75 -0
- tensorarray-0.0.2/third_party/pybind11/tests/CMakeLists.txt +657 -0
- tensorarray-0.0.2/third_party/pybind11/tests/pure_cpp/CMakeLists.txt +20 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/CMakeLists.txt +91 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +19 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +29 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +37 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +38 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +32 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +38 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_cross_module_rtti/CMakeLists.txt +68 -0
- tensorarray-0.0.2/third_party/pybind11/tests/test_embed/CMakeLists.txt +61 -0
- tensorarray-0.0.2/third_party/pybind11/tools/FindCatch.cmake +76 -0
- tensorarray-0.0.2/third_party/pybind11/tools/FindEigen3.cmake +86 -0
- tensorarray-0.0.2/third_party/pybind11/tools/FindPythonLibsNew.cmake +320 -0
- tensorarray-0.0.2/third_party/pybind11/tools/JoinPaths.cmake +23 -0
- tensorarray-0.0.2/third_party/pybind11/tools/check-style.sh +44 -0
- tensorarray-0.0.2/third_party/pybind11/tools/cmake_uninstall.cmake.in +23 -0
- tensorarray-0.0.2/third_party/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
- tensorarray-0.0.2/third_party/pybind11/tools/libsize.py +38 -0
- tensorarray-0.0.2/third_party/pybind11/tools/make_changelog.py +115 -0
- tensorarray-0.0.2/third_party/pybind11/tools/make_global.py +33 -0
- tensorarray-0.0.2/third_party/pybind11/tools/pybind11.pc.in +7 -0
- tensorarray-0.0.2/third_party/pybind11/tools/pybind11Common.cmake +442 -0
- tensorarray-0.0.2/third_party/pybind11/tools/pybind11Config.cmake.in +240 -0
- tensorarray-0.0.2/third_party/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +86 -0
- tensorarray-0.0.2/third_party/pybind11/tools/pybind11NewTools.cmake +353 -0
- tensorarray-0.0.2/third_party/pybind11/tools/pybind11Tools.cmake +217 -0
- tensorarray-0.0.2/third_party/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +161 -0
- TensorArray-0.0.1a0/PKG-INFO +0 -19
- TensorArray-0.0.1a0/README.md +0 -4
- TensorArray-0.0.1a0/pyproject.toml +0 -23
- TensorArray-0.0.1a0/src/TensorArray.egg-info/PKG-INFO +0 -19
- TensorArray-0.0.1a0/src/TensorArray.egg-info/SOURCES.txt +0 -22
- TensorArray-0.0.1a0/src/TensorArray.egg-info/top_level.txt +0 -1
- TensorArray-0.0.1a0/src/tensor_array/core/__init__.py +0 -3
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/__init__.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/attention/__init__.py +0 -0
- {TensorArray-0.0.1a0 → tensorarray-0.0.2}/src/tensor_array/layers/normalization/__init__.py +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
cmake_minimum_required(VERSION 3.18.0)
|
2
|
+
find_package(Python COMPONENTS Interpreter Development)
|
3
|
+
if (${Python_FOUND})
|
4
|
+
|
5
|
+
project(TensorArray_Python VERSION 0.1.0 LANGUAGES C CXX)
|
6
|
+
|
7
|
+
include(CTest)
|
8
|
+
enable_testing()
|
9
|
+
|
10
|
+
add_subdirectory("third_party/pybind11" EXCLUDE_FROM_ALL)
|
11
|
+
add_subdirectory("tensor-array-repo/Tensor-Array" EXCLUDE_FROM_ALL)
|
12
|
+
pybind11_add_module(tensor2 SHARED src/tensor_array/_core/tensor_bind.cc)
|
13
|
+
|
14
|
+
target_include_directories(
|
15
|
+
tensor2
|
16
|
+
PUBLIC "${CMAKE_CURRENT_LIST_DIR}/tensor-array-repo/Tensor-Array/src"
|
17
|
+
INTERFACE ${Python_INCLUDE_DIRS}
|
18
|
+
)
|
19
|
+
|
20
|
+
SET_TARGET_PROPERTIES(tensor2 PROPERTIES PREFIX "")
|
21
|
+
|
22
|
+
target_link_libraries(tensor2 PUBLIC TensorArray::Core)
|
23
|
+
|
24
|
+
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
25
|
+
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
26
|
+
include(CPack)
|
27
|
+
|
28
|
+
endif()
|
29
|
+
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
include README.md LICENSE tensor-array-repo/Tensor-Array/LICENSE third_party/pybind11/LICENSE
|
2
|
+
graft third_party/pybind11/include
|
3
|
+
graft third_party/pybind11/tools
|
4
|
+
graft tensor-array-repo/Tensor-Array/src
|
5
|
+
graft src
|
6
|
+
global-include CMakeLists.txt *.cmake Config.cmake.in
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: TensorArray
|
3
|
+
Version: 0.0.2
|
4
|
+
Summary: A machine learning package
|
5
|
+
Home-page: https://github.com/Tensor-Array/Tensor-Array-Python
|
6
|
+
License: MIT
|
7
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
15
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
|
16
|
+
Requires-Python: >=3.8
|
17
|
+
License-File: LICENSE
|
18
|
+
|
19
|
+
# Tensor Array Python
|
20
|
+
[](https://pypi.org/project/TensorArray/)
|
21
|
+
[](https://pypi.org/project/TensorArray/)
|
22
|
+
[](https://pypi.org/project/TensorArray/)
|
23
|
+
[](https://pypi.org/project/TensorArray/)
|
24
|
+
[](#)
|
25
|
+
|
26
|
+
This machine learning library using [Tensor-Array](https://github.com/Tensor-Array/Tensor-Array) library
|
27
|
+
|
28
|
+
This project is still in alpha version, we are trying to make this look like the main framework but it is easier to code.
|
29
|
+
|
30
|
+
## How to install Tensor-Array python version.
|
31
|
+
```shell
|
32
|
+
$ pip install TensorArray
|
33
|
+
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Tensor Array Python
|
2
|
+
[](https://pypi.org/project/TensorArray/)
|
3
|
+
[](https://pypi.org/project/TensorArray/)
|
4
|
+
[](https://pypi.org/project/TensorArray/)
|
5
|
+
[](https://pypi.org/project/TensorArray/)
|
6
|
+
[](#)
|
7
|
+
|
8
|
+
This machine learning library using [Tensor-Array](https://github.com/Tensor-Array/Tensor-Array) library
|
9
|
+
|
10
|
+
This project is still in alpha version, we are trying to make this look like the main framework but it is easier to code.
|
11
|
+
|
12
|
+
## How to install Tensor-Array python version.
|
13
|
+
```shell
|
14
|
+
$ pip install TensorArray
|
15
|
+
```
|
File without changes
|
@@ -0,0 +1,171 @@
|
|
1
|
+
import os
|
2
|
+
import re
|
3
|
+
import subprocess
|
4
|
+
import sys
|
5
|
+
from pathlib import Path
|
6
|
+
|
7
|
+
from setuptools import Extension, setup, find_packages
|
8
|
+
from setuptools.command.build_ext import build_ext
|
9
|
+
|
10
|
+
# Convert distutils Windows platform specifiers to CMake -A arguments
|
11
|
+
PLAT_TO_CMAKE = {
|
12
|
+
"win32": "Win32",
|
13
|
+
"win-amd64": "x64",
|
14
|
+
"win-arm32": "ARM",
|
15
|
+
"win-arm64": "ARM64",
|
16
|
+
}
|
17
|
+
|
18
|
+
|
19
|
+
# A CMakeExtension needs a sourcedir instead of a file list.
|
20
|
+
# The name must be the _single_ output extension from the CMake build.
|
21
|
+
# If you need multiple extensions, see scikit-build.
|
22
|
+
class CMakeExtension(Extension):
|
23
|
+
def __init__(self, name: str, sourcedir: str = "") -> None:
|
24
|
+
super().__init__(name, sources=[])
|
25
|
+
self.sourcedir = os.fspath(Path(sourcedir).resolve())
|
26
|
+
|
27
|
+
|
28
|
+
class CMakeBuild(build_ext):
|
29
|
+
def build_extension(self, ext: CMakeExtension) -> None:
|
30
|
+
# Must be in this form due to bug in .resolve() only fixed in Python 3.10+
|
31
|
+
ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name)
|
32
|
+
extdir = ext_fullpath.parent.resolve()
|
33
|
+
|
34
|
+
# Using this requires trailing slash for auto-detection & inclusion of
|
35
|
+
# auxiliary "native" libs
|
36
|
+
|
37
|
+
debug = int(os.environ.get("DEBUG", 0)) if self.debug is None else self.debug
|
38
|
+
cfg = "Debug" if debug else "Release"
|
39
|
+
|
40
|
+
# CMake lets you override the generator - we need to check this.
|
41
|
+
# Can be set with Conda-Build, for example.
|
42
|
+
cmake_generator = os.environ.get("CMAKE_GENERATOR", "")
|
43
|
+
|
44
|
+
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
|
45
|
+
# EXAMPLE_VERSION_INFO shows you how to pass a value into the C++ code
|
46
|
+
# from Python.
|
47
|
+
cmake_args = [
|
48
|
+
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
|
49
|
+
f"-DPYTHON_EXECUTABLE={sys.executable}",
|
50
|
+
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
|
51
|
+
]
|
52
|
+
build_args = []
|
53
|
+
# Adding CMake arguments set as environment variable
|
54
|
+
# (needed e.g. to build for ARM OSx on conda-forge)
|
55
|
+
if "CMAKE_ARGS" in os.environ:
|
56
|
+
cmake_args += [item for item in os.environ["CMAKE_ARGS"].split(" ") if item]
|
57
|
+
|
58
|
+
# In this example, we pass in the version to C++. You might not need to.
|
59
|
+
cmake_args += [f"-DEXAMPLE_VERSION_INFO={self.distribution.get_version()}"]
|
60
|
+
|
61
|
+
if self.compiler.compiler_type != "msvc":
|
62
|
+
# Using Ninja-build since it a) is available as a wheel and b)
|
63
|
+
# multithreads automatically. MSVC would require all variables be
|
64
|
+
# exported for Ninja to pick it up, which is a little tricky to do.
|
65
|
+
# Users can override the generator with CMAKE_GENERATOR in CMake
|
66
|
+
# 3.15+.
|
67
|
+
if not cmake_generator or cmake_generator == "Ninja":
|
68
|
+
try:
|
69
|
+
import ninja
|
70
|
+
|
71
|
+
ninja_executable_path = Path(ninja.BIN_DIR) / "ninja"
|
72
|
+
cmake_args += [
|
73
|
+
"-GNinja",
|
74
|
+
f"-DCMAKE_MAKE_PROGRAM:FILEPATH={ninja_executable_path}",
|
75
|
+
]
|
76
|
+
except ImportError:
|
77
|
+
pass
|
78
|
+
|
79
|
+
else:
|
80
|
+
# Single config generators are handled "normally"
|
81
|
+
single_config = any(x in cmake_generator for x in {"NMake", "Ninja"})
|
82
|
+
|
83
|
+
# CMake allows an arch-in-generator style for backward compatibility
|
84
|
+
contains_arch = any(x in cmake_generator for x in {"ARM", "Win64"})
|
85
|
+
|
86
|
+
# Specify the arch if using MSVC generator, but only if it doesn't
|
87
|
+
# contain a backward-compatibility arch spec already in the
|
88
|
+
# generator name.
|
89
|
+
if not single_config and not contains_arch:
|
90
|
+
cmake_args += ["-A", PLAT_TO_CMAKE[self.plat_name]]
|
91
|
+
|
92
|
+
# Multi-config generators have a different way to specify configs
|
93
|
+
if not single_config:
|
94
|
+
cmake_args += [
|
95
|
+
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{cfg.upper()}={extdir}"
|
96
|
+
]
|
97
|
+
build_args += ["--config", cfg]
|
98
|
+
|
99
|
+
if sys.platform.startswith("darwin"):
|
100
|
+
# Cross-compile support for macOS - respect ARCHFLAGS if set
|
101
|
+
archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
|
102
|
+
if archs:
|
103
|
+
cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]
|
104
|
+
|
105
|
+
# Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
|
106
|
+
# across all generators.
|
107
|
+
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ:
|
108
|
+
# self.parallel is a Python 3 only way to set parallel jobs by hand
|
109
|
+
# using -j in the build_ext call, not supported by pip or PyPA-build.
|
110
|
+
if hasattr(self, "parallel") and self.parallel:
|
111
|
+
# CMake 3.12+ only.
|
112
|
+
build_args += [f"-j{self.parallel}"]
|
113
|
+
|
114
|
+
build_temp = Path(self.build_temp) / ext.name
|
115
|
+
if not build_temp.exists():
|
116
|
+
build_temp.mkdir(parents=True)
|
117
|
+
|
118
|
+
subprocess.run(
|
119
|
+
["cmake", ext.sourcedir, *cmake_args], cwd=build_temp, check=True
|
120
|
+
)
|
121
|
+
subprocess.run(
|
122
|
+
["cmake", "--build", ".", *build_args], cwd=build_temp, check=True
|
123
|
+
)
|
124
|
+
|
125
|
+
def main():
|
126
|
+
cwd = os.path.dirname(os.path.abspath(__file__))
|
127
|
+
with open(os.path.join(cwd, "README.md"), encoding="utf-8") as f:
|
128
|
+
long_description = f.read()
|
129
|
+
|
130
|
+
packages = find_packages("")
|
131
|
+
|
132
|
+
print(packages)
|
133
|
+
|
134
|
+
setup(
|
135
|
+
name = "TensorArray",
|
136
|
+
version = "0.0.2",
|
137
|
+
description = "A machine learning package",
|
138
|
+
long_description=long_description,
|
139
|
+
authors = "TensorArray-Creators",
|
140
|
+
url= "https://github.com/Tensor-Array/Tensor-Array-Python",
|
141
|
+
packages=packages,
|
142
|
+
ext_modules=[
|
143
|
+
CMakeExtension("tensor_array/core/tensor2")
|
144
|
+
],
|
145
|
+
classifiers = [
|
146
|
+
"Development Status :: 2 - Pre-Alpha",
|
147
|
+
|
148
|
+
"Programming Language :: Python :: 3",
|
149
|
+
"Programming Language :: Python :: 3.9",
|
150
|
+
"Programming Language :: Python :: 3.10",
|
151
|
+
"Programming Language :: Python :: 3.11",
|
152
|
+
"Programming Language :: Python :: 3.12",
|
153
|
+
"Programming Language :: Python :: 3.13",
|
154
|
+
|
155
|
+
"License :: OSI Approved :: MIT License",
|
156
|
+
|
157
|
+
"Environment :: GPU :: NVIDIA CUDA :: 12",
|
158
|
+
],
|
159
|
+
license="MIT",
|
160
|
+
cmdclass={
|
161
|
+
"build_ext": CMakeBuild
|
162
|
+
},
|
163
|
+
package_dir={
|
164
|
+
"": "src",
|
165
|
+
"tests": "tests"
|
166
|
+
},
|
167
|
+
python_requires=">=3.8",
|
168
|
+
)
|
169
|
+
|
170
|
+
if __name__ == "__main__":
|
171
|
+
main()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: TensorArray
|
3
|
+
Version: 0.0.2
|
4
|
+
Summary: A machine learning package
|
5
|
+
Home-page: https://github.com/Tensor-Array/Tensor-Array-Python
|
6
|
+
License: MIT
|
7
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
15
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
|
16
|
+
Requires-Python: >=3.8
|
17
|
+
License-File: LICENSE
|
18
|
+
|
19
|
+
# Tensor Array Python
|
20
|
+
[](https://pypi.org/project/TensorArray/)
|
21
|
+
[](https://pypi.org/project/TensorArray/)
|
22
|
+
[](https://pypi.org/project/TensorArray/)
|
23
|
+
[](https://pypi.org/project/TensorArray/)
|
24
|
+
[](#)
|
25
|
+
|
26
|
+
This machine learning library using [Tensor-Array](https://github.com/Tensor-Array/Tensor-Array) library
|
27
|
+
|
28
|
+
This project is still in alpha version, we are trying to make this look like the main framework but it is easier to code.
|
29
|
+
|
30
|
+
## How to install Tensor-Array python version.
|
31
|
+
```shell
|
32
|
+
$ pip install TensorArray
|
33
|
+
```
|
@@ -0,0 +1,158 @@
|
|
1
|
+
CMakeLists.txt
|
2
|
+
LICENSE
|
3
|
+
MANIFEST.in
|
4
|
+
README.md
|
5
|
+
pyproject.toml
|
6
|
+
setup.py
|
7
|
+
src/TensorArray.egg-info/PKG-INFO
|
8
|
+
src/TensorArray.egg-info/SOURCES.txt
|
9
|
+
src/TensorArray.egg-info/dependency_links.txt
|
10
|
+
src/TensorArray.egg-info/top_level.txt
|
11
|
+
src/tensor_array/__init__.py
|
12
|
+
src/tensor_array/activation.py
|
13
|
+
src/tensor_array/_core/tensor_bind.cc
|
14
|
+
src/tensor_array/core/__init__.py
|
15
|
+
src/tensor_array/core/constants.py
|
16
|
+
src/tensor_array/core/datatypes.py
|
17
|
+
src/tensor_array/core/operator.py
|
18
|
+
src/tensor_array/core/tensor.py
|
19
|
+
src/tensor_array/core/tensor2.cpython-38-x86_64-linux-gnu.so
|
20
|
+
src/tensor_array/layers/__init__.py
|
21
|
+
src/tensor_array/layers/layer.py
|
22
|
+
src/tensor_array/layers/parameter.py
|
23
|
+
src/tensor_array/layers/attention/__init__.py
|
24
|
+
src/tensor_array/layers/attention/attention.py
|
25
|
+
src/tensor_array/layers/attention/transformer.py
|
26
|
+
src/tensor_array/layers/normalization/__init__.py
|
27
|
+
src/tensor_array/layers/normalization/normalization.py
|
28
|
+
src/tensor_array/layers/util/__init__.py
|
29
|
+
src/tensor_array/layers/util/activation.py
|
30
|
+
src/tensor_array/layers/util/linear.py
|
31
|
+
src/tensor_array/layers/util/sequential.py
|
32
|
+
tensor-array-repo/Tensor-Array/CMakeLists.txt
|
33
|
+
tensor-array-repo/Tensor-Array/Config.cmake.in
|
34
|
+
tensor-array-repo/Tensor-Array/LICENSE
|
35
|
+
tensor-array-repo/Tensor-Array/src/_
|
36
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/CMakeLists.txt
|
37
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/data_type_wrapper.cc
|
38
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/data_type_wrapper.hh
|
39
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/devices.cc
|
40
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/devices.hh
|
41
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/extern_type_map.cc
|
42
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/extern_type_map.hh
|
43
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/initializer_wrapper.hh
|
44
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor.cc
|
45
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor.cu
|
46
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor.hh
|
47
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_blas.cc
|
48
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_cast.cu
|
49
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_convolution.cc
|
50
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_convolution.cu
|
51
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensor_reduce.cu
|
52
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensorarray.hh
|
53
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensorbase.cc
|
54
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/core/tensorbase.hh
|
55
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/CMakeLists.txt
|
56
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/attention.cc
|
57
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/attention.hh
|
58
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/convolution.cc
|
59
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/convolution.hh
|
60
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_any.cc
|
61
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_any.hh
|
62
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_holder.hh
|
63
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_impl.cc
|
64
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_impl.hh
|
65
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_utility.cc
|
66
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/layer_utility.hh
|
67
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/linear.cc
|
68
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/linear.hh
|
69
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/normalization.cc
|
70
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/normalization.hh
|
71
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/recurrent.cc
|
72
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/recurrent.hh
|
73
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/sequential.cc
|
74
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/sequential.hh
|
75
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/transformer.cc
|
76
|
+
tensor-array-repo/Tensor-Array/src/tensor_array/layers/transformer.hh
|
77
|
+
third_party/pybind11/CMakeLists.txt
|
78
|
+
third_party/pybind11/LICENSE
|
79
|
+
third_party/pybind11/include/pybind11/attr.h
|
80
|
+
third_party/pybind11/include/pybind11/buffer_info.h
|
81
|
+
third_party/pybind11/include/pybind11/cast.h
|
82
|
+
third_party/pybind11/include/pybind11/chrono.h
|
83
|
+
third_party/pybind11/include/pybind11/common.h
|
84
|
+
third_party/pybind11/include/pybind11/complex.h
|
85
|
+
third_party/pybind11/include/pybind11/critical_section.h
|
86
|
+
third_party/pybind11/include/pybind11/eigen.h
|
87
|
+
third_party/pybind11/include/pybind11/embed.h
|
88
|
+
third_party/pybind11/include/pybind11/eval.h
|
89
|
+
third_party/pybind11/include/pybind11/functional.h
|
90
|
+
third_party/pybind11/include/pybind11/gil.h
|
91
|
+
third_party/pybind11/include/pybind11/gil_safe_call_once.h
|
92
|
+
third_party/pybind11/include/pybind11/gil_simple.h
|
93
|
+
third_party/pybind11/include/pybind11/iostream.h
|
94
|
+
third_party/pybind11/include/pybind11/native_enum.h
|
95
|
+
third_party/pybind11/include/pybind11/numpy.h
|
96
|
+
third_party/pybind11/include/pybind11/operators.h
|
97
|
+
third_party/pybind11/include/pybind11/options.h
|
98
|
+
third_party/pybind11/include/pybind11/pybind11.h
|
99
|
+
third_party/pybind11/include/pybind11/pytypes.h
|
100
|
+
third_party/pybind11/include/pybind11/stl.h
|
101
|
+
third_party/pybind11/include/pybind11/stl_bind.h
|
102
|
+
third_party/pybind11/include/pybind11/subinterpreter.h
|
103
|
+
third_party/pybind11/include/pybind11/trampoline_self_life_support.h
|
104
|
+
third_party/pybind11/include/pybind11/type_caster_pyobject_ptr.h
|
105
|
+
third_party/pybind11/include/pybind11/typing.h
|
106
|
+
third_party/pybind11/include/pybind11/warnings.h
|
107
|
+
third_party/pybind11/include/pybind11/conduit/README.txt
|
108
|
+
third_party/pybind11/include/pybind11/conduit/pybind11_conduit_v1.h
|
109
|
+
third_party/pybind11/include/pybind11/conduit/pybind11_platform_abi_id.h
|
110
|
+
third_party/pybind11/include/pybind11/conduit/wrap_include_python_h.h
|
111
|
+
third_party/pybind11/include/pybind11/detail/class.h
|
112
|
+
third_party/pybind11/include/pybind11/detail/common.h
|
113
|
+
third_party/pybind11/include/pybind11/detail/cpp_conduit.h
|
114
|
+
third_party/pybind11/include/pybind11/detail/descr.h
|
115
|
+
third_party/pybind11/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h
|
116
|
+
third_party/pybind11/include/pybind11/detail/exception_translation.h
|
117
|
+
third_party/pybind11/include/pybind11/detail/function_record_pyobject.h
|
118
|
+
third_party/pybind11/include/pybind11/detail/init.h
|
119
|
+
third_party/pybind11/include/pybind11/detail/internals.h
|
120
|
+
third_party/pybind11/include/pybind11/detail/native_enum_data.h
|
121
|
+
third_party/pybind11/include/pybind11/detail/pybind11_namespace_macros.h
|
122
|
+
third_party/pybind11/include/pybind11/detail/struct_smart_holder.h
|
123
|
+
third_party/pybind11/include/pybind11/detail/type_caster_base.h
|
124
|
+
third_party/pybind11/include/pybind11/detail/typeid.h
|
125
|
+
third_party/pybind11/include/pybind11/detail/using_smart_holder.h
|
126
|
+
third_party/pybind11/include/pybind11/detail/value_and_holder.h
|
127
|
+
third_party/pybind11/include/pybind11/eigen/common.h
|
128
|
+
third_party/pybind11/include/pybind11/eigen/matrix.h
|
129
|
+
third_party/pybind11/include/pybind11/eigen/tensor.h
|
130
|
+
third_party/pybind11/include/pybind11/stl/filesystem.h
|
131
|
+
third_party/pybind11/tests/CMakeLists.txt
|
132
|
+
third_party/pybind11/tests/pure_cpp/CMakeLists.txt
|
133
|
+
third_party/pybind11/tests/test_cmake_build/CMakeLists.txt
|
134
|
+
third_party/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt
|
135
|
+
third_party/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt
|
136
|
+
third_party/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt
|
137
|
+
third_party/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
|
138
|
+
third_party/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt
|
139
|
+
third_party/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt
|
140
|
+
third_party/pybind11/tests/test_cross_module_rtti/CMakeLists.txt
|
141
|
+
third_party/pybind11/tests/test_embed/CMakeLists.txt
|
142
|
+
third_party/pybind11/tools/FindCatch.cmake
|
143
|
+
third_party/pybind11/tools/FindEigen3.cmake
|
144
|
+
third_party/pybind11/tools/FindPythonLibsNew.cmake
|
145
|
+
third_party/pybind11/tools/JoinPaths.cmake
|
146
|
+
third_party/pybind11/tools/check-style.sh
|
147
|
+
third_party/pybind11/tools/cmake_uninstall.cmake.in
|
148
|
+
third_party/pybind11/tools/codespell_ignore_lines_from_errors.py
|
149
|
+
third_party/pybind11/tools/libsize.py
|
150
|
+
third_party/pybind11/tools/make_changelog.py
|
151
|
+
third_party/pybind11/tools/make_global.py
|
152
|
+
third_party/pybind11/tools/pybind11.pc.in
|
153
|
+
third_party/pybind11/tools/pybind11Common.cmake
|
154
|
+
third_party/pybind11/tools/pybind11Config.cmake.in
|
155
|
+
third_party/pybind11/tools/pybind11GuessPythonExtSuffix.cmake
|
156
|
+
third_party/pybind11/tools/pybind11NewTools.cmake
|
157
|
+
third_party/pybind11/tools/pybind11Tools.cmake
|
158
|
+
third_party/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
tensor_array/core/tensor2
|