tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Python] Support Python 3.9.X+

Open AndrewZhaoLuo opened this issue 4 years ago • 6 comments
trafficstars

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.

AndrewZhaoLuo avatar Jul 28 '21 17:07 AndrewZhaoLuo

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

tkonolige avatar Jul 28 '21 18:07 tkonolige

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

AndrewZhaoLuo avatar Feb 09 '22 00:02 AndrewZhaoLuo

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

tkonolige avatar Feb 09 '22 00:02 tkonolige

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

hsuanguo avatar Jul 20 '22 20:07 hsuanguo

cc @hpanda-naut can you triage

areusch avatar Jul 25 '22 05:07 areusch

@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?

areusch avatar Jul 25 '22 05:07 areusch

I guess https://github.com/apache/tvm/pull/13269 does not fix the python 3.9 support completely?

hsuanguo avatar Nov 16 '22 10:11 hsuanguo

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

AndrewZhaoLuo avatar Nov 16 '22 17:11 AndrewZhaoLuo

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

access2rohit avatar Dec 15 '22 01:12 access2rohit

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

AndrewZhaoLuo avatar Dec 15 '22 16:12 AndrewZhaoLuo

@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

junrushao avatar Dec 15 '22 17:12 junrushao

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).

cconvey avatar Mar 29 '23 14:03 cconvey

Is there any new progress on this issue?

shaoyuyoung avatar Dec 03 '23 07:12 shaoyuyoung

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

tqchen avatar Dec 03 '23 14:12 tqchen