Skip to content

Commit 37b248f

Browse files
temp release
1 parent 234ce2c commit 37b248f

File tree

12 files changed

+69
-14
lines changed

12 files changed

+69
-14
lines changed

.devcontainer/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ghcr.io/tensor-array/tensor-array:master
2+
3+
# [Optional] Uncomment this section to install additional vcpkg ports.
4+
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
5+
6+
# [Optional] Uncomment this section to install additional packages.
7+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
8+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
3+
{
4+
"name": "C++",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
},
8+
9+
"features": {
10+
"ghcr.io/devcontainers/features/github-cli:1": {},
11+
"ghcr.io/devcontainers/features/python:1": {}
12+
},
13+
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"ms-vscode.cpptools-extension-pack",
18+
"ms-vscode.cmake-tools"
19+
]
20+
}
21+
},
22+
23+
"hostRequirements": {
24+
"gpu": "optional"
25+
}
26+
// Features to add to the dev container. More info: https://containers.dev/features.
27+
// "features": {},
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
// "postCreateCommand": "gcc -v",
34+
35+
// Configure tool-specific properties.
36+
// "customizations": {},
37+
38+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
39+
// "remoteUser": "root"
40+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ build/
33
bin/
44
temp/
55
__pycache__/
6+
*.egg-info/*
67
*/*.egg-info/*
78
dist/
89
*.so

.vscode/c_cpp_properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"includePath": [
66
"${workspaceFolder}/**",
77
"${workspaceFolder}/third_party/pybind11/include/**",
8-
"/usr/include/python3.10/**",
8+
"/usr/include/python3.*/**",
99
"${workspaceFolder}/tensor-array-repo/Tensor-Array/src/**"
1010
],
1111
"defines": [],

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = [
33
"setuptools",
4-
"wheel",
54
"ninja",
65
"cmake"
76
]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ def main():
127127
with open(os.path.join(cwd, "README.md"), encoding="utf-8") as f:
128128
long_description = f.read()
129129

130-
packages = find_packages("src")
130+
packages = find_packages("")
131131

132132
print(packages)
133133

134134
setup(
135135
name = "TensorArray",
136-
version = "0.0.1a3",
136+
version = "0.0.3",
137137
description = "A machine learning package",
138138
long_description=long_description,
139139
authors = "TensorArray-Creators",

src/tensor_array/_core/tensor_bind.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
using namespace tensor_array::value;
99
using namespace tensor_array::datatype;
10+
using namespace tensor_array::wrapper;
1011

1112
template <typename T>
1213
TensorBase convert_numpy_to_tensor_base(pybind11::array_t<T> py_buf)
@@ -93,7 +94,7 @@ Tensor python_tuple_slice(const Tensor& self, pybind11::tuple tuple_slice)
9394
}
9495
);
9596
}
96-
return self[tensor_array::wrapper::initializer_wrapper(t_slices.begin().operator->(), t_slices.end().operator->())];
97+
return self[initializer_wrapper<Tensor::Slice>(t_slices.begin().operator->(), t_slices.end().operator->())];
9798
}
9899

99100
Tensor python_slice(const Tensor& self, pybind11::slice py_slice)
@@ -139,7 +140,7 @@ Tensor tensor_cast_1(const Tensor& self, DataType dtype)
139140

140141
pybind11::tuple tensor_shape(const Tensor& self)
141142
{
142-
return pybind11::cast(std::vector(self.get_buffer().shape()));
143+
return pybind11::cast(std::vector<unsigned int>(self.get_buffer().shape()));
143144
}
144145

145146
DataType tensor_type(const Tensor& self)

src/tensor_array/core/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from tensor_array.core.tensor2 import zeros as zerosWrapper
1+
from .tensor2 import zeros as zerosWrapper
22
from .tensor import Tensor
33
from .datatypes import DataTypes
44

src/tensor_array/core/datatypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from tensor_array.core.tensor2 import DataType as DataTypeWrapper
1+
from .tensor2 import DataType as DataTypeWrapper
22
from enum import Enum
33

44
class DataTypes(Enum):

src/tensor_array/core/operator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from .tensor import Tensor
2-
from tensor_array.core.tensor2 import add as addWrapper
3-
from tensor_array.core.tensor2 import multiply as multiplyWrapper
4-
from tensor_array.core.tensor2 import divide as divideWrapper
5-
from tensor_array.core.tensor2 import matmul as matmulWrapper
6-
from tensor_array.core.tensor2 import condition as conditionWrapper
2+
from .tensor2 import add as addWrapper
3+
from .tensor2 import multiply as multiplyWrapper
4+
from .tensor2 import divide as divideWrapper
5+
from .tensor2 import matmul as matmulWrapper
6+
from .tensor2 import condition as conditionWrapper
77

88
def add(value_1 : Tensor, value_2 : Tensor):
99
return addWrapper(value_1, value_2)

src/tensor_array/core/tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from tensor_array.core.tensor2 import Tensor as TensorWrapper
1+
from .tensor2 import Tensor as TensorWrapper
22
from .datatypes import DataTypes
33

44
class Tensor(TensorWrapper):

0 commit comments

Comments
 (0)