Skip to content

Commit 9bf8db1

Browse files
test
0 parents  commit 9bf8db1

File tree

223 files changed

+11073
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+11073
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build/.cmake/
2+
build/src/
3+
build/Testing/
4+
.venv/
5+
lib/
6+
bin/

.vscode/c_cpp_properties.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Linux",
5+
"includePath": [
6+
"${workspaceFolder}/**",
7+
"${workspaceFolder}/.venv/lib/python3.10/site-packages/pybind11/include/**",
8+
"/usr/include/python3.10/**",
9+
"/mnt/d/C++_ver2/TensorMain_wsl2/src"
10+
],
11+
"defines": [],
12+
"compilerPath": "/usr/bin/g++"
13+
}
14+
],
15+
"version": 4
16+
}

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "2.0.0",
3+
"options": {
4+
"cwd": "${workspaceFolder}/build"
5+
},
6+
"tasks": [
7+
{
8+
"label": "cmake",
9+
"command": "cmake",
10+
"args": []
11+
},
12+
{
13+
"label": "make",
14+
"command": "make"
15+
},
16+
{
17+
"label": "cmake build",
18+
"dependsOn": [
19+
"cmake",
20+
"make"
21+
],
22+
"problemMatcher": [
23+
"$gcc"
24+
]
25+
}
26+
]
27+
}

CMakeLists.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
cmake_minimum_required(VERSION 3.0.0)
2+
find_package(Python COMPONENTS Interpreter Development)
3+
if (${Python_FOUND})
4+
project(TensorCore_Python VERSION 0.1.0 LANGUAGES C CXX)
5+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/lib)
6+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/lib)
7+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin)
8+
9+
include(CTest)
10+
enable_testing()
11+
12+
add_library(tensor SHARED src/tensor_bind.cc)
13+
14+
target_include_directories(
15+
tensor
16+
PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.venv/lib/python3.10/site-packages/pybind11/include"
17+
PRIVATE "/mnt/d/C++_ver2/TensorMain_wsl2/src"
18+
PRIVATE ${Python_INCLUDE_DIRS}
19+
)
20+
21+
SET_TARGET_PROPERTIES(tensor PROPERTIES PREFIX "")
22+
23+
target_link_directories(
24+
tensor
25+
PRIVATE "/mnt/d/C++_ver2/TensorMain_wsl2/lib"
26+
)
27+
28+
target_link_libraries(tensor TensorCore_Core)
29+
30+
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
31+
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
32+
include(CPack)
33+
34+
install(TARGETS tensor LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
35+
endif()

0 commit comments

Comments
 (0)