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

[Python] Support Python 3.9.X+ #8577

Closed
2 tasks
AndrewZhaoLuo opened this issue Jul 28, 2021 · 14 comments
Closed
2 tasks

[Python] Support Python 3.9.X+ #8577

AndrewZhaoLuo opened this issue Jul 28, 2021 · 14 comments
Labels
dev:ci python Pull requests that update Python code

Comments

@AndrewZhaoLuo
Copy link
Contributor

AndrewZhaoLuo commented Jul 28, 2021

This issue is to track issues with python 3.9.x+ in TVM.

  • Switch hybrid script to use synr.
  • Make sure nothing in the tvm codebase requires forking new threads (as opposed to spawning).

@tkonolige @jroesch @areusch Please fill in when you have time.

@tkonolige
Copy link
Contributor

  • Switch hybrid script to use synr.
  • Make sure nothing in the tvm codebase requires forking new threads (as opposed to spawning).

@AndrewZhaoLuo
Copy link
Contributor Author

@tkonolige do you happen to know the status of this issue? I heard some work with SYNR was occuring?

@tkonolige
Copy link
Contributor

Synr is fine, its hybrid script that needs to be updated to use synr.

@hsuanguo
Copy link
Contributor

What's the status of this issue? Is there any plan to support python 3.9?

@areusch
Copy link
Contributor

areusch commented Jul 25, 2022

cc @hpanda-naut can you triage

@areusch
Copy link
Contributor

areusch commented Jul 25, 2022

@hsuanguo i'm not sure we've moved on this at the moment. @junrushao1994 @yelite do you know the story around hybrid script and synr?

driazati pushed a commit that referenced this issue Oct 12, 2022
The current [build-environment.yaml](https://github.com/apache/tvm/blob/main/conda/build-environment.yaml) doesn't specify the python version for `tvm-build` conda environment and as a result, any python version might be selected depending on the available base conda. In my case, the base conda is 3.10 so tvm won't work given [tvm is unsupported for python >= 3.9](#8577).

To validate run on `tvm-build` env 

```
conda env update -f conda/build-environment.yaml
```
@areusch areusch added the needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it label Oct 19, 2022
@Lunderberg Lunderberg added python Pull requests that update Python code dev:ci and removed needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it labels Oct 28, 2022
@hsuanguo
Copy link
Contributor

I guess #13269 does not fix the python 3.9 support completely?

@AndrewZhaoLuo
Copy link
Contributor Author

You can use 3.9, however some parts of TVM might not work (e.g. hybridscript).

xinetzone pushed a commit to daobook/tvm that referenced this issue Nov 25, 2022
The current [build-environment.yaml](https://github.com/apache/tvm/blob/main/conda/build-environment.yaml) doesn't specify the python version for `tvm-build` conda environment and as a result, any python version might be selected depending on the available base conda. In my case, the base conda is 3.10 so tvm won't work given [tvm is unsupported for python >= 3.9](apache#8577).

To validate run on `tvm-build` env 

```
conda env update -f conda/build-environment.yaml
```
@access2rohit
Copy link

Is there a list of functionalities that might get affected when using tvm with python-3.9 ?

@AndrewZhaoLuo
Copy link
Contributor Author

AndrewZhaoLuo commented Dec 15, 2022

Some dynamic (i.e. the shape is not known until runtime) kernels will not work due to incompatibility with ̶T̶V̶M̶s̶c̶r̶i̶p̶t̶.̶ HybridScript

@junrushao
Copy link
Member

@AndrewZhaoLuo TVMScript is tested to support python 3.6-3.10, the part that doesn’t support python 3.9 is the legacy hybrid script. We need to migrate them to TVMScript

@cconvey
Copy link
Contributor

cconvey commented Mar 29, 2023

Another possible issue: when trying to run TVM's python unit tests with Python 3.10.6, I get this:

ImportError: Error importing plugin "tvm.testing.plugin": /home/cconvey/.local/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send

Also:

$ pip3.10 show scipy
Name: scipy
Version: 1.6.1
Summary: SciPy: Scientific Library for Python
Home-page: https://www.scipy.org
Author: 
Author-email: 
License: BSD
Location: /home/cconvey/.local/lib/python3.10/site-packages
Requires: numpy
Required-by: tvm, xgboost

I don't think I told pip3.10 which particular version of scipy I wanted to install. As of this writing, these TVM docs only mention using a specific scipy in the case of M1 Macs. My machine is running x86-64 on Linux (specifically, Pop!_OS 22.04).

@shaoyuyoung
Copy link

Is there any new progress on this issue?

@tqchen
Copy link
Member

tqchen commented Dec 3, 2023

Only part of the legacy features comes with legacy dependency. Given we migrated TVMScript with python10 support, closing this for now

@tqchen tqchen closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:ci python Pull requests that update Python code
Projects
Development

No branches or pull requests

10 participants