Coder Social home page Coder Social logo

splinepsf's Introduction

SplinePSF

This is a factored out implementation repository of the spline function implemented in C++/C and CUDA. Currently it may only be used in conjunction with the DeepSMLM package. However we are planning on small standalone wrapper for Python / MATLAB; this is also the reason why we opted for a separate repository.

Installation

conda install -c haydnspass -c conda-forge spline

Known Limitations

  • C++/CUDA implementation is currently not ready for standalone use
  • Updated: CUDA supports arbitrary ROI size now. CUDA does not support ROIs bigger than 32 x 32 = 1024 pixels (this is due to the maximum number of threads per block). Please refer to the CPU version in this case

Build and Install Python package for Local Use

python setup.py install

Buildwheels

python setup.py bdist_wheel

Build and Deploy with conda

# recommended: create a new conda build environment
conda create --name build_clean conda-build
conda activate build_clean

# navigate to [repo]/conda
cd dist_tools/conda
conda-build -c conda-forge spline

splinepsf's People

Contributors

haydnspass avatar k-dominik avatar olbris avatar

Stargazers

 avatar

Watchers

 avatar

splinepsf's Issues

Pip / PyPi Deployment

Hey,

Great to hear that we have some help to figure out how to deploy the stuff via Pip / Pypi as a second option to conda! :) We do this mainly because pip support is more native on Google Colab. I don't know if you have looked at the code/deployment but it is roughly structured like this:

  • C++ / CUDA is built with the help of CMake. Building with CUDA might require to set environment variables to point to the right CUDA version / compiler etc.; not building the CUDA part on purpose can be done with appropriate flags.
  • On top of the CMake there is a wrapper as a python setup.py which basically just calls the CMake.
  • The actual conda deployment happens in the respective conda files / directories which does all the dependency handling and then calls the python setup.py.

I imagine the only change/addition would be in the setup.py which is commonly used to deploy to PyPi right? There one would specify the dependencies again?

The platforms we want to deploy to are macOS, Linux and Windows. Last time I did this to conda I excluded CUDA support for macOS (because Nvidia and Apple ...) and for Windows because there were some weird bugs. It would be good to have CUDA support for windows as well though.

MacOS Compiler / SDK on Github

@olbris I think the problem with the macOS runner is the version of the SDK in combination with the clang version I set in the build config. I had to change the version on my local machine as well.

Let's do it like this: https://github.com/adc-connect/adcc/blob/041cdcb16ec60d1655db8d562ef2f3b53038c120/.github/workflows/publish.yaml#L48

Then I will need to set the CONDA_BUILD_SYSROOT and I need to pass this to CMake.
This way it should work irrespective of any changes of the macOS runner.

CMAKE > 3.18 with multiple cuda architectures does not work

import spline
Traceback (most recent call last):
File "", line 1, in
ImportError: /home/lucas/xconda3/envs/decode_dev_cuda_dev_spline/lib/python3.8/site-packages/spline-0.10.0a0-py3.8-linux-x86_64.egg/spline.cpython-38-x86_64-linux-gnu.so: undefined symbol: fatbinData

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.