Comments (3)
How did you link the shared library ?
Here is an example of setup.py (the one you call with python setup.py build_ext --inplace
):
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ext_modules=[
Extension("fbcorr_cython", ["fbcorr_cython.pyx"],
include_dirs = [numpy.get_include(),'.'],
libraries=['cblas'],
extra_compile_args = \
["-O3", "-Wall",
"-pthread",
"-fopenmp",
#"-ffast-math",
#"-funroll-all-loops",
"-msse2",
"-msse3",
"-msse4",
#"-fomit-frame-pointer",
"-march=native",
"-mtune=native",
"-ftree-vectorize",
"-ftree-vectorizer-verbose=2",
#"-fwrapv",
],
),
]
setup(
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules,
)
The relevant line is in the libraries
kwarg.
from asgd.
Nevermind, the problem is that I accidentally misnamed the shared
library as .o instead of .so - changing that solved it.
I am not using setup.py, I am compiling the files manually via Makefile
with the same calls specified at http://wiki.cython.org/tutorials/numpy
it's more convenient because with the Makefile variables you can use the
same parameters for compiling everything.
On 11/13/2011 10:56 PM, Nicolas Pinto wrote:
How did you link the shared library ?
Here is an example of setup.py (the one you call with
python setup.py build_ext --inplace
):from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy ext_modules=[ Extension("fbcorr_cython", ["fbcorr_cython.pyx"], include_dirs = [numpy.get_include(),'.'], libraries=['cblas'], extra_compile_args = \ ["-O3", "-Wall", "-pthread", "-fopenmp", #"-ffast-math", #"-funroll-all-loops", "-msse2", "-msse3", "-msse4", #"-fomit-frame-pointer", "-march=native", "-mtune=native", "-ftree-vectorize", "-ftree-vectorizer-verbose=2", #"-fwrapv", ], ), ] setup( cmdclass = {'build_ext': build_ext}, ext_modules = ext_modules, )
The relevant line is in the
libraries
kwarg.
Reply to this email directly or view it on GitHub:
#10 (comment)
from asgd.
For Cython modules, please use setup.py or we'll have many issues in the future.
from asgd.
Related Issues (17)
- BLAS and heap safety HOT 3
- Compute X_mean and X_std in fit().
- Use η0 / (1 + λ η0 t)^0.75 by default instead of ...^2/3.
- step_size0 should be cross validated on a small subset of the data HOT 3
- Sparsity trick on weights update
- re-parameterize annealing schedule HOT 11
- new reference for readme HOT 1
- simple_blas.h missing? HOT 2
- Ready to test! HOT 5
- Working feedback
- Parameter for (exponentially) moving average
- kwargs for mini_batch settings
- Weight updates only if margin constraint violated. HOT 1
- multiclass HOT 1
- Online LOOE-like for hyper-parameters selection.
- ENH: warm-up period with exponential moving asgd and switch from sgd to asgd when empirical loss gets higher
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asgd.