sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 480 forks source link

Add Pyjion JIT compiler #32845

Open mkoeppe opened 3 years ago

mkoeppe commented 3 years ago

https://github.com/tonybaloney/Pyjion

https://pyjion.readthedocs.io/en/latest/index.html

Requires Python 3.10

and .NET 6

Depends on #30766

Component: packages: optional

Author: Matthias Koeppe

Branch/Commit: u/mkoeppe/add_pyjion_jit_compiler @ b811ca7

Issue created by migration from https://trac.sagemath.org/ticket/32845

mkoeppe commented 2 years ago

Branch: u/mkoeppe/add_pyjion_jit_compiler

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

d8ff1b2src/sage/cpython/__init__.py: Use pyjion.config(pgc=False)
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Commit: d8ff1b2

mkoeppe commented 2 years ago
comment:4

Even after using pyjion.config(pgc=False), running the test suite gives a number of errors like

    pyjion.PyjionUnboxingError: Optimizations are invalid. Pyjion PGC expected float, but 1 is a int. Try disabling PGC pyjion.config(pgc=False) or lowering the optimization level to avoid hitting this error.
mkoeppe commented 2 years ago
comment:5

Also

    sage.repl.rich_output.display_manager.RichReprWarning: Exception in _rich_repr_ while displaying object: new style getargs format but argument is not a tuple
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,10 @@
 https://github.com/tonybaloney/Pyjion

 Requires Python 3.10
+
+and .NET 6 
+- https://repology.org/project/dotnet6-sdk/versions
+- https://repology.org/project/dotnet-sdk-6.0/versions
+- https://repology.org/project/dotnet-core/versions
+- https://repology.org/project/dotnet/versions
+
mkoeppe commented 2 years ago

Author: Matthias Koeppe

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,6 @@
 https://github.com/tonybaloney/Pyjion
+
+https://pyjion.readthedocs.io/en/latest/index.html

 Requires Python 3.10
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -5,8 +5,7 @@
 Requires Python 3.10

 and .NET 6 
-- https://repology.org/project/dotnet6-sdk/versions
-- https://repology.org/project/dotnet-sdk-6.0/versions
+- https://docs.microsoft.com/en-us/dotnet/core/install/linux
 - https://repology.org/project/dotnet-core/versions
 - https://repology.org/project/dotnet/versions
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from d8ff1b2 to d7b76a1

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

4571b67build/pkgs/pyjion: New
d7b76a1build/pkgs/dotnet/distros: Add fedora, arch
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

fd95788src/sage/cpython/__init__.py: Use pyjion.config(pgc=False, level=0)
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from d7b76a1 to fd95788

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from fd95788 to b811ca7

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b811ca7src/sage/cpython/__init__.py: Use warnings.warn instead of polluting stdout
mkoeppe commented 2 years ago
comment:13

Probably should only enable it if some environment variable is set (going through sage.env), and should note it in the banner instead of a warning.