Update Cython usage in scan_perform.pyx #129
Labels
C-backend
enhancement
New feature or request
help wanted
Extra attention is needed
important
question
Further information is requested
refactor
This issue involves refactoring
Scan
Involves the `Scan` `Op`
We're currently versioning the C code produced by Cython for the
Scan
Op
, and I'm not sure if that's necessary (or the correct approach). It also requires a manual compilation and patch step when the relevant code is changed, which seems a little less than desirable.Since it looks like we're compiling the Cython-generated C code with Theano's GCC compilation framework, I'm guessing that Cython's compilation framework somehow isn't/wasn't compatible. Even so, this situation raises some important questions:
Linker
that does this automatically, and why don't we use something like that to replace all these string-basedc_code
implementations?Cython already has a well developed means of both separating and combining Python code from its more implementation specific C details, so using that framework could dramatically improve the unnecessary tangle of high and low-level details brought about by the current Theano C transpilation framework.
There's really no reason to think that Cython's compilation framework isn't already far ahead of Theano's in many ways (e.g. default parameters and host system detection/configuration for one). My initial guess is that we would need to use it programatically, at least in a way that's similar to what Theano is currently doing with
gcc
and the like, but I don't see any reason why it wouldn't be just as amenable—if not considerably more (e.g. if it has a Python interface that helps us avoid writing our own onerous system calls).The text was updated successfully, but these errors were encountered: