-
Notifications
You must be signed in to change notification settings - Fork 95
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
Dev_pycpufit #125
Merged
Merged
Dev_pycpufit #125
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
20daf14
[pycpufit] functioning example for win added
Kubiczek36 6866eb5
path generalisation
Kubiczek36 6d05e65
files copied from the pygpufit
Kubiczek36 1b8cfbf
done some changes, however needs revision!
Kubiczek36 e89fee6
added line for macos
Kubiczek36 a0e4a30
Update CMakeLists.txt for pyCpufit build
superchromix c727c34
Update README.txt for pyCpufit
superchromix b05352e
Update setup.py for pyCpufit build
superchromix f7e672d
bugfix
superchromix d284ae7
bugfix
superchromix 2866ad4
bugfix
superchromix dae67f3
bugfix
superchromix 1fc4bd8
bug fix
blmicroscope 8026219
Merge branch 'dev_pycpufit' of https://github.com/Kubiczek36/Gpufit i…
blmicroscope d6a7aa6
bug fix
blmicroscope e7ce57f
bugfixes
superchromix 12b3cf4
bug fix
blmicroscope b0c20f7
Merge branch 'dev_pycpufit' of https://github.com/Kubiczek36/Gpufit i…
superchromix 441ce4e
gpufit -> cpufit in the lib name
blmicroscope f0e58a3
[cpufit] emptying __init__
blmicroscope f5d5e3f
[pycpufit] added import to the __init__
blmicroscope c2f3192
[cpufit] moving examples
blmicroscope 57167e8
[cpufit] file cleanup
blmicroscope 3e926ba
[docs] adding info how to install python pkg
blmicroscope File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
# Python | ||
|
||
# Python package | ||
|
||
set( build_directory "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/pyCpufit" ) | ||
set( setup_files | ||
"${CMAKE_CURRENT_SOURCE_DIR}/README.txt" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/setup.py" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/setup.cfg" | ||
) | ||
set( module_directory "${build_directory}/pycpufit" ) | ||
set( module_files | ||
"${CMAKE_CURRENT_SOURCE_DIR}/pycpufit/__init__.py" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/pycpufit/cpufit.py" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/pycpufit/version.py" | ||
) | ||
|
||
|
||
set( binary $<TARGET_FILE:Cpufit> ) | ||
|
||
|
||
add_custom_target( PYTHON_PACKAGE_CPUFIT | ||
COMMAND ${CMAKE_COMMAND} -E | ||
remove_directory ${build_directory} | ||
COMMAND ${CMAKE_COMMAND} -E | ||
make_directory ${build_directory} | ||
COMMAND ${CMAKE_COMMAND} -E | ||
copy_if_different ${setup_files} ${build_directory} | ||
COMMAND ${CMAKE_COMMAND} -E | ||
make_directory ${module_directory} | ||
COMMAND ${CMAKE_COMMAND} -E | ||
copy_if_different ${module_files} ${module_directory} | ||
COMMAND ${CMAKE_COMMAND} -E | ||
copy_if_different ${binary} ${module_directory} | ||
) | ||
|
||
set_property( TARGET PYTHON_PACKAGE_CPUFIT PROPERTY FOLDER CMakePredefinedTargets ) | ||
add_dependencies( PYTHON_PACKAGE_CPUFIT Cpufit ) | ||
|
||
if( NOT PYTHONINTERP_FOUND ) | ||
message( STATUS "Python NOT found - skipping creation of Python wheel!" ) | ||
return() | ||
endif() | ||
|
||
# Python wheel (output name is incorrect, requires plattform tag, see packaging) | ||
|
||
add_custom_target( PYTHON_WHEEL_CPUFIT ALL | ||
COMMAND ${CMAKE_COMMAND} -E | ||
chdir ${build_directory} "${PYTHON_EXECUTABLE}" setup.py clean --all | ||
COMMAND ${CMAKE_COMMAND} -E | ||
chdir ${build_directory} "${PYTHON_EXECUTABLE}" setup.py bdist_wheel | ||
COMMENT "Preparing Python Wheel" | ||
) | ||
set_property( TARGET PYTHON_WHEEL_CPUFIT PROPERTY FOLDER CMakePredefinedTargets ) | ||
add_dependencies( PYTHON_WHEEL_CPUFIT PYTHON_PACKAGE_CPUFIT ) | ||
|
||
# add launcher to Python package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Python binding for the [Cpufit library](https://github.com/gpufit/Gpufit) which implements Levenberg Marquardt curve fitting in CUDA | ||
|
||
Requirements | ||
|
||
- Windows | ||
- Python 2 or 3 with NumPy | ||
|
||
Installation | ||
|
||
Currently the wheel file has to be installed locally. | ||
|
||
If NumPy is not yet installed, install it using pip from the command line | ||
|
||
pip install numpy | ||
|
||
Then install pyCpufit from the local folder via: | ||
|
||
pip install --no-index --find-links=LocalPathToWheelFile pyCpufit | ||
|
||
Examples | ||
|
||
See project-root/examples/python folder. **Cpufit** examples begin with `cpufit_`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from cpufit import * |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
building on linux this needed to be
from .cpufit import *
for me