tenstorrent / tt-buda

Tenstorrent TT-BUDA Repository
Other
162 stars 21 forks source link

error python version in compile_and_run.sh #18

Closed refill closed 2 months ago

refill commented 3 months ago

I try to build in Ubuntu 22.04, python3.10

install prerequisites.

and run compile_and_test.sh

but.. error like that,

g++ -MMD -I. -O3 -g -DDEBUG -mavx2 -DBUILD_DIR=\"build\" -Ibuild/include -DFMT_HEADER_ONLY -Ithird_party/fmt -Ithird_party/pybind11/include -Wall -Wextra -Wno-pragmas -DUTILS_LOGGER_PYTHON_OSTREAM_REDIRECT=1 --std=c++17 -maes -mavx -shared -fPIC -Ipybuda/csrc -Ithird_party/json -Ithird_party/budabackend -Ithird_party/budabackend/netlist -I/usr/include/python3.8 -isystem build/python_env/lib/python3.8/site-packages/torch/include -isystem build/python_env/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -c -o build/obj/pybuda/csrc/passes/bind_reshape_to_io.o pybuda/csrc/passes/bind_reshape_to_io.cpp In file included from third_party/pybind11/include/pybind11/detail/../attr.h:13, from third_party/pybind11/include/pybind11/detail/class.h:12, from third_party/pybind11/include/pybind11/pybind11.h:13, from pybuda/csrc/passes/bind_reshape_to_io.cpp:6: third_party/pybind11/include/pybind11/detail/../detail/common.h:211:10: fatal error: Python.h: No such file or directory 211 | #include | ^~~~~~

I was fix PYTHON_VERSION in tt_buda/python_env/module.mk

and delete "git reset -hard " , in compile_and_run.sh

please fix script and document (https://docs.tenstorrent.com/tenstorrent/v/tt-buda/installation#python-environment-installation)

staylorTT commented 3 months ago

Thanks for the report. Presently, Tenstorrent software is only supported on the Ubuntu 20.04 LTS (Focal Fossa) operating system. Let me check if we support python 3.10 currently. I will work with the team to provide an appropriate update.

-edit: I am working with the team to get these updated to reflect 3.10/ 22.04

staylorTT commented 2 months ago

Vladimir, can you update the compile_and_run.sh to work with 3.10 / 22.04 and have the documentation updated to reflect that support as well?

vmilosevic commented 2 months ago

PyBuda is now also supported on Ubuntu 22.04, we will update the documentation to reflect that.

The script compile_and_run.sh is a utility script for running specific tests, and you shouldn't use it for initial compilation. Instead, you can use env_for_silicon.sh script that activates the Python environment and starts the build for grayskull.

Environment variable PYTHON_VERSION tells PyBuda which version of Python to use and where to look for Python.h. Ubuntu 20.04 comes with Python 3.8 by default and you should set it to PYTHON_VERSION: "python3.8", while Ubuntu 22.04 comes with Python 3.10 and it should be set to PYTHON_VERSION: "python3.10".

You can take a look at the Github action that builds the PyBuda for reference https://github.com/tenstorrent/tt-buda/actions/runs/8853304872/job/24313841016

staylorTT commented 2 months ago

We have updated the docs and this will be published with our next release. Thank you all for contributing to the project.