triton icon indicating copy to clipboard operation
triton copied to clipboard

Windows build no longer working

Open ericflo opened this issue 2 years ago • 3 comments

Before #703, it appears that Windows was detected and early returned. In the new code, it's going down a path that invokes os.environ["HOME"] which raises KeyError on Windows:

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [39 lines of output]
    running egg_info
    writing triton.egg-info\PKG-INFO
    writing dependency_links to triton.egg-info\dependency_links.txt
    writing requirements to triton.egg-info\requires.txt
    writing top-level names to triton.egg-info\top_level.txt
    package init file 'triton/_C\__init__.py' not found (or not a regular file)
    reading manifest file 'triton.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'triton.egg-info\SOURCES.txt'
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "C:\Users\flogu\Development\dreamface\worker\venv\src\triton\python\setup.py", line 151, in <module>
        setup(
      File "C:\Users\flogu\Development\dreamface\worker\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\flogu\Development\dreamface\worker\venv\lib\site-packages\setuptools\command\develop.py", line 34, in run
        self.install_for_development()
      File "C:\Users\flogu\Development\dreamface\worker\venv\lib\site-packages\setuptools\command\develop.py", line 114, in install_for_development
        self.run_command('build_ext')
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\flogu\Development\dreamface\worker\venv\src\triton\python\setup.py", line 113, in run
        self.build_extension(ext)
      File "C:\Users\flogu\Development\dreamface\worker\venv\src\triton\python\setup.py", line 116, in build_extension
        triton_cache_path = os.path.join(os.environ["HOME"], ".triton")
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 679, in __getitem__
        raise KeyError(key) from None
    KeyError: 'HOME'
    [end of output]

ericflo avatar Oct 11 '22 02:10 ericflo

Same issue here on Windows 10 Pro with AMD CPU.

ooofest avatar Oct 13 '22 00:10 ooofest

You may need to run git submodule update --init --recursive;

ptillet avatar Oct 13 '22 19:10 ptillet

For those who had it working on windows previously - could you share what LLVM version you are using and any other knowledge it takes to get it building?

Thomas-MMJ avatar Oct 16 '22 17:10 Thomas-MMJ

any news? i have the same error like ericflo :(

janoschsimon avatar Dec 19 '22 18:12 janoschsimon

We're in the middle of merging the Triton rewrite we've been working on for the past 6 months. We'll revisit the issues after it's merged :)

ptillet avatar Dec 19 '22 18:12 ptillet

Have run into the same issue. Can we set some value to HOME to bypass this for now?

shashank42 avatar Dec 28 '22 11:12 shashank42