tenstorrent / tt-buda

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

KeyError: 'BACKEND_ARCH_NAME' #20

Closed danindiana closed 3 months ago

danindiana commented 3 months ago

Sorry if there is a lot going on here. Feel like I'm getting closer. Please also see the output.txt file attached which has additional error info from the pytest pybuda/test/model_demos/high_prio/ --setup-plan

(python_env) zorapa@zero-one:~/bud/tt-buda$ python setup.py Traceback (most recent call last): File "setup.py", line 258, in arch_code = arch_codes[os.environ["BACKEND_ARCH_NAME"]] File "/usr/lib/python3.8/os.py", line 675, in getitem raise KeyError(key) from None KeyError: 'BACKEND_ARCH_NAME' (python_env) zorapa@zero-one:~/bud/tt-buda$ uname -m x86_64 (python_env) zorapa@zero-one:~/bud/tt-buda$ export BACKEND_ARCH_NAME=x86_64 (python_env) zorapa@zero-one:~/bud/tt-buda$ python setup.py Traceback (most recent call last): File "setup.py", line 258, in arch_code = arch_codes[os.environ["BACKEND_ARCH_NAME"]] KeyError: 'x86_64' (python_env) zorapa@zero-one:~/bud/tt-buda$ pip3 install pyyaml Requirement already satisfied: pyyaml in ./build/python_env/lib/python3.8/site-packages (6.0.1) (python_env) zorapa@zero-one:~/bud/tt-buda$ ^C (python_env) zorapa@zero-one:~/bud/tt-buda$ sudo nano setup.py (python_env) zorapa@zero-one:~/bud/tt-buda$ python3 setup.py Traceback (most recent call last): File "setup.py", line 258, in arch_code = arch_codes[os.environ["BACKEND_ARCH_NAME"]] KeyError: 'x86_64' (python_env) zorapa@zero-one:~/bud/tt-buda$ ls bisect.sh build ci compile_and_run_test.sh compile_flags.txt docs env_for_blackhole.sh env_for_silicon.sh env_for_wormhole_b0.sh LICENCE Makefile pybuda pyproject.toml pytest.ini python_env README.debug.md README.md README.silicon.md run_tests.py scripts setup.py silicon_sanity.sh smoke_test.py third_party tt_build utils (python_env) zorapa@zero-one:~/bud/tt-buda$ python3 setup.py Traceback (most recent call last): File "setup.py", line 258, in arch_code = arch_codes[os.environ["BACKEND_ARCH_NAME"]] KeyError: 'x86_64' (python_env) zorapa@zero-one:~/bud/tt-buda$

OS: Ubuntu 20.04 focal Kernel: x86_64 Linux 5.15.0-102-generic Uptime: 2h 44m Packages: 2032 Shell: bash 5.0.17 Disk: 95G / 1.9T (6%) CPU: AMD Ryzen 9 7950X3D 16-Core @ 32x 4.2GHz GPU: AMD/ATI RAM: 3416MiB / 192425MiB

Screenshot_2024-04-10_00-38-51

image

Gemini's input:

It seems like there's still a mismatch between the expected value for the BACKEND_ARCH_NAME environment variable and PyBUDA's internal setup. Let's investigate!

Possible Causes:

  1. Incorrect Value in arch_codes: The setup.py file likely contains a dictionary called arch_codes that maps architecture names to specific configuration values. It's possible this dictionary doesn't have an entry for "x86_64".
  2. Typo or Case Sensitivity: Ensure there are no typos in your export command and that the value in arch_codes in the setup.py file matches exactly (x86_64 might be case-sensitive).
  3. Alternative Variable: PyBUDA's setup might be expecting a different environment variable altogether to specify the architecture.

Troubleshooting Steps:

  1. Examine setup.py:

    • Open the setup.py file in a text editor.
    • Search for a variable named arch_codes or something similar.
    • Examine the keys (architecture names) in this dictionary. Find the key that best corresponds to your architecture.
    • Update your export command accordingly:

      export BACKEND_ARCH_NAME=correct_key_from_setup_py
  2. Consult the Documentation:

    • Look for a section in the PyBUDA documentation related to build configurations, environment variables, or architecture settings. There might be specific instructions on how to set the correct architecture identifier.

Example Scenario:

Let's say your arch_codes dictionary in setup.py looks like this:

arch_codes = {
    "x86": "some_code",
    "arm64": "other_code" 
}

In this case, you might need to adjust your export command:

export BACKEND_ARCH_NAME=x86 

Please Provide the following:

danindiana commented 3 months ago

Probably an error in the Python version used to build the compile/toolchain. Closing out as I have been able to correctly compile the tt dependencies on the target server.