npinto / asgd

Averaged Stochastic Gradient Descent Classifiers
41 stars 21 forks source link

BLAS and heap safety #1

Closed argoncloud closed 13 years ago

argoncloud commented 13 years ago

I have integrated BLAS in the code, and all functions are complete. However, a BLAS call causes a memory corruption: I need to track it down and correct it. It is probably a wrong size parameter (e.g. sizeof(*x) instead of 1). Lack of documentation for BLAS (both the NetLib version and OpenBLAS) is definitely an issue - will have to be more careful.

After this, I will need to unit-test the code. A preliminary step could be testing the code entirely in C (which makes testing harder, but allows me to test before writing the Python wrapper) or wrapping the functions first (allows for a more flexible testing, but potentially introduces issues with wrapping).

npinto commented 13 years ago

Thanks Claudio. BTW, it might be easier to develop the testing framework first (in python would be simpler, but a testing framework in C will also help release a pure C library), using a naive C implementation -- what do you think?

argoncloud commented 13 years ago

Fixed the memory issue for predict: I was using a stride size in bytes instead of number of items. Fit is fine, but I still have to do _partialfit (tomorrow)

npinto commented 13 years ago

Great news! Closing the issue.