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

Use Transonic #1

Closed
wants to merge 2 commits into from
Closed

Use Transonic #1

wants to merge 2 commits into from

Conversation

paugier
Copy link
Contributor

@paugier paugier commented Jul 19, 2019

It is not a serious PR to be merged. I work on Transonic and I needed a package which uses Pythran (to check that Transonic works fine on real life cases).

Anyway, I open this PR to demonstrate how Transonic can be useful for a project like pylandstats. Since there was only one simple Pythran file with a very simple signature, it is not spectacular!

Warning:

  • No Python 2.7 support!
  • the -DUSE_XSIMD flag could lead to problems on Windows and macOS (to be checked).

@martibosch
Copy link
Owner

First of all, thank you very much for your contribution.
I actually dropped the Python 2 support in the 1.0.0 release a couple of days ago, so given that your PR passes all checks (I further tested running the example notebooks and everything works), it could actually be merged.
The main issue is whether using transonic would fix the issues that I am having to build pylandstats via conda in windows. Any help in such issue would be very welcome and strongly appreciated.

Martí

@paugier
Copy link
Contributor Author

paugier commented Jul 22, 2019

I am not a great expert in conda-forge. I know that there are sometimes issues difficult to understand and solve! @CyrilleBonamy usually works on our conda builds for the FluidDyn packages.

@CyrilleBonamy can you please confirm that we have some successful conda-forge builds for Windows using Pythran? Do you understand the error with pylandstats (https://github.com/conda-forge/pylandstats-feedstock/pull/) ?

Regarding Transonic and conda-forge:

  1. Transonic is now only a tool to use Pythran very easily. It won't save you magically if Pythran can't compile a function...

  2. We're working on Transonic to make it able to use with the same code Pythran or Cython or Numba. This could help in cases where Pythran is not able to compile a function for a particular OS (for example Windows). It should not be difficult to setup the build such that for a function Cython is used for Windows and Pythran (faster but less mature) for other operative systems.

This is not the best solution and again you would have to wait for the next release of Transonic but it could help in some cases.

@CyrilleBonamy
Copy link

I am not a great expert in conda-forge. I know that there are sometimes issues difficult to understand and solve! @CyrilleBonamy usually works on our conda builds for the FluidDyn packages.

@CyrilleBonamy can you please confirm that we have some successful conda-forge builds for Windows using Pythran? Do you understand the error with pylandstats (https://github.com/conda-forge/pylandstats-feedstock/pull/) ?

No ... we did not build conda-forge package for Windows using pythran

@martibosch martibosch force-pushed the master branch 2 times, most recently from f0dea5b to e365204 Compare July 24, 2019 19:48
@martibosch
Copy link
Owner

Hello @paugier,

This is not the best solution and again you would have to wait for the next release of Transonic but it could help in some cases.

are there any news regarding this?

I would be happy to merge your PR once we can ensure that conda builds work in Windows (even if not using Pythran but Cython/Numba).

Thank you,
Martí

@paugier
Copy link
Contributor Author

paugier commented Sep 17, 2019

Hi @martibosch

Transonic improved a lot since my last message. It should be possible to use Cython or Numba on Windows for your code.

However, I'm still working on important features and there will be a new release in few days/weeks. I think it is more reasonable to wait for the next release to really use Transonic for your use case (Cython or Numba for Windows for a code where Pythran does not compile on Windows).

I will work on a better way to choose the backend (Pythran or Cython or Numba) at compile time and run time. Currently, this can be done only with the environment variable TRANSONIC_BACKEND (like this https://transonic.readthedocs.io/en/latest/examples/row_sum/txt.html). It is not really convenient for your case!

I'll take your code as a target for next release.

@paugier
Copy link
Contributor Author

paugier commented Sep 23, 2019

Deprecated by PR #2

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

Successfully merging this pull request may close these issues.

None yet

3 participants