Skip to content
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

Cpufit API documentation and external bindings #110

Open
casparvitch opened this issue Oct 1, 2022 · 3 comments
Open

Cpufit API documentation and external bindings #110

casparvitch opened this issue Oct 1, 2022 · 3 comments

Comments

@casparvitch
Copy link
Contributor

Hi, great package, thanks for sharing.

I would find it useful to have the same API exposed to Cpufit as Gpufit, for cases when running on machines without a GPU.

I've had a brief read through the code and four things appear as small problems for me at the moment:

  1. Cpufit isn't self-contained, it requires 'Gpufit/constants.h' for example (I believe). Probably not tricky to refactor, but does Cpufit it any way assume the cuda SDK is installed to build? It would be nice if it didn't.
  2. Cpufit's API is not documented. I assume this isn't a big problem as it seems the same as Gpufit. Are there any issues here?
  3. Cpufit doesn't currently have a cpufit_contrained function, how complex would it be to copy the changes across from Gpufit?
  4. Only a MATLAB binding exists at the moment, I would like to add a python binding. Ok that's not a problem, I just need to write it :)

Apologies if any of these are obvious or annoying questions.
I'm happy to contribute docs etc. if you think that's useful, if you can point me in the right direction re. the above.

Cheers

@casparvitch
Copy link
Contributor Author

casparvitch commented Oct 1, 2022

Follow up question: does Cpufit in any way utilize multicore/thread processing? Thanks again. The paper states that it runs in a single CPU thread.

@superchromix
Copy link
Collaborator

Thanks for your comments.

Cpufit uses the same algorithm as Gpufit. It was created for testing, debugging, and benchmarking purposes. We didn’t envision the Cpufit package being used as a workhorse for curve fitting. However, I can see the use case as providing a fallback solution when no GPU is present in the system.

Regarding your questions:

  1. I’m not sure, I haven’t tried building Cpufit on a system without CUDA. CMake would likely not configure the project if it does not find CUDA installed. On the other hand, it is not necessary to have a GPU installed in the system in order to install CUDA, so I’m not sure this is actually a limitation.
  2. Gpufit and Cpufit have very similar APIs, but yes the Cpufit API is not documented (for the reasons above). The docs could be expanded to explicitly include Cpufit.
  3. It would not be difficult to modify Cpufit to include constraints. Constraints were added to Gpufit in a later iteration, and should in principle also be present in the Cpufit algorithm.

@casparvitch
Copy link
Contributor Author

Thanks for the prompt reply, I'll set up a branch and start playing as that all sounds promising!
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants