-
Notifications
You must be signed in to change notification settings - Fork 22
Update user guide and documentation for v1.1.0 #713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: haoti/doc_update
Are you sure you want to change the base?
Changes from all commits
5d21fc8
28b86ff
72917d8
6706900
2e7d5cc
4704655
7c5db0c
ce07fbc
419680a
af4f554
86e4c4c
fe5fbfe
6a13bd0
f2eabc8
c496789
e8c071c
f10bd9a
0f15dae
fd89469
0139fc1
81d3d54
48fdebe
8f143c4
191214c
0d6da15
2d0b401
d722c1e
955a870
ab51bf7
b3ffb83
bf4099f
fc95f40
596f11c
b2c9e7f
8edee83
d515052
41e57ac
808ba2d
2ca179c
960b42d
14c1c3d
c6c1726
7435a94
584a517
b6dfcf2
cc12e63
068801c
ee3a71c
eb3e3be
e6b1800
4a23aa9
dbfc9bd
4d95705
14ad688
aab740b
acf4366
a60c799
ce9e440
0189195
f1ed932
8e56071
443a0e8
85ece18
c0466e9
f2e9345
7b69f35
a640816
8999f45
30642e7
d48f06f
4181138
7fa6d91
8cc2b16
6409754
506c360
bf49ef3
b21d7e0
d32e7d3
edd5e1d
67b6a58
98cf329
a964231
2732110
be1cfcf
29af7f3
254322e
dc4d21c
989c3c5
c54e777
22f340d
282f955
3883771
240990e
e2bba84
e839fa8
f9bb7f3
fb2fa90
e87c3a2
c5e79bf
c5dd9c4
9ab00e2
a8f447a
623f884
b0503a4
cf82d5f
557d6e1
f680c31
86b5d07
016deea
dec28fa
73a7931
033ece3
fcbb71e
91dd9ac
f460da4
9ae0c21
ce9f442
cd99f8f
ba011f8
8642e78
432eaaa
f4befdf
150d2b6
4080739
ff0b024
92dcecb
147aa79
9e675bd
12d4f07
810abf1
18091c1
8ee661a
ff8e987
fa015d4
06f3f82
1dfbeee
89965ef
1aecfa4
397ecbc
f03293e
93552ee
e9d90ff
42e86b1
22aab5f
0a7812e
c52e8e3
0d017d8
f34237f
3d7ca70
750e15d
a22dd1e
5b9c10c
c05b1e5
301ebec
acc0ac3
ede1dfc
acc2a49
9ff1bdb
f12da93
4573d03
7948b7b
f9983e4
9142d24
f55128c
940992f
b137803
5270cc5
37f865d
026b321
b9429db
4f7612f
d20477a
550a5ed
b3da6f1
c0320b5
a804f79
17a0b26
3374ca4
d646429
d23a236
7aa7862
58f985b
5edeede
07ba4c5
da8be6d
ae00a31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,7 +146,7 @@ endfunction() | |
|
|
||
| include(CMakeDependentOption) | ||
|
|
||
| set(CMAKE_INSTALL_PREFIX "/usr/local/cytnx" CACHE PATH "Destination path for installation") | ||
| set(CMAKE_INSTALL_PREFIX "~/.local/cytnx" CACHE PATH "Destination path for installation") | ||
| option(BUILD_PYTHON "Build Python API. Requires Python and pybind11 installed." ON) | ||
| option(BACKEND_TORCH "Use PyTorch as a backend container for tensors." OFF) | ||
| cmake_dependent_option(USE_MKL "Use MKL as a BLAS provider otherwise use OpenBLAS." OFF "NOT BACKEND_TORCH" OFF) | ||
|
|
@@ -317,14 +317,14 @@ endif() | |
| # ####### | ||
| IF(BUILD_PYTHON) | ||
| find_package (Python COMPONENTS Interpreter Development) | ||
| find_package(pybind11 REQUIRED) | ||
| find_package(pybind11 3.0.0 QUIET) | ||
|
|
||
| if(NOT pybind11_FOUND) | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| pybind11_sources | ||
| GIT_REPOSITORY https://github.com/pybind/pybind11.git | ||
| GIT_TAG v2.11.1 | ||
| GIT_TAG v3.0.1 | ||
| ) | ||
|
|
||
| FetchContent_GetProperties(pybind11_sources) | ||
|
|
@@ -339,7 +339,7 @@ IF(BUILD_PYTHON) | |
| endif() | ||
| endif() | ||
|
|
||
| pybind11_add_module(pycytnx SHARED pybind/cytnx.cpp | ||
| pybind11_add_module(pycytnx MODULE pybind/cytnx.cpp | ||
| pybind/generator_py.cpp | ||
| pybind/storage_py.cpp | ||
| pybind/tensor_py.cpp | ||
|
|
@@ -357,13 +357,31 @@ IF(BUILD_PYTHON) | |
| pybind/ncon_py.cpp | ||
| ) | ||
| target_link_libraries(pycytnx PUBLIC cytnx) | ||
|
|
||
| # On macOS, Python extensions should NOT link to libpython | ||
| # Use -undefined dynamic_lookup to resolve symbols from the running interpreter | ||
| if(APPLE) | ||
| target_link_options(pycytnx PRIVATE "-undefined" "dynamic_lookup") | ||
| endif() | ||
| set_target_properties(pycytnx PROPERTIES OUTPUT_NAME cytnx) | ||
| message(STATUS "pybind11 include dir: ${CUTENSOR_LIBRARY_DIRS}") | ||
| message(STATUS "pybind11 include dir: ${CUQUANTUM_LIBRARY_DIRS}") | ||
| set_target_properties(pycytnx | ||
| PROPERTIES | ||
| INSTALL_RPATH "${CUTENSOR_LIBRARY_DIRS};${CUQUANTUM_LIBRARY_DIRS}" | ||
| ) | ||
| message(STATUS "pybind11 include dir: ${LAPACK_LIBRARY_DIRS}") | ||
| message(STATUS "pybind11 include dir: ${LAPACKE_LIBRARY_DIRS}") | ||
| # Configure RPATH for macOS to make the Python extension relocatable | ||
| if(APPLE) | ||
| set_target_properties(pycytnx | ||
| PROPERTIES | ||
| BUILD_WITH_INSTALL_RPATH TRUE | ||
| INSTALL_RPATH_USE_LINK_PATH TRUE | ||
| INSTALL_RPATH "@loader_path;@loader_path/../../../lib;${CMAKE_INSTALL_PREFIX}/lib" | ||
| ) | ||
| else() | ||
| set_target_properties(pycytnx | ||
| PROPERTIES | ||
| INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/lib" | ||
| ) | ||
|
Comment on lines
+380
to
+383
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On non-macOS installs, Useful? React with 👍 / 👎.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is taken over from the current master branch, which was merged into this branch. Can someone comment?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from f2e9345
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yingjerkao could you check this? |
||
| endif() | ||
|
|
||
| message(STATUS " Build Python Wrapper: YES") | ||
| message(STATUS " - Python Excutable : ${PYTHON_EXECUTABLE}") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step runs
git merge --no-edit, andgit mergeperforms a commit by default (--[no-]commit perform a commit if the merge succeeds), so on runners without a preconfigureduser.name/user.emailit aborts with “Committer identity unknown” whenever the merge is non-fast-forward. That causes pull_request workflows to fail before tests even start; add an explicitgit config user.name/user.email(or avoid creating a merge commit) before this command.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is taken over from the current master branch, which was merged into this branch. Can someone comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is from 808ba2d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IvanaGyro could you check this?