triton-lang / triton

Development repository for the Triton language and compiler
https://triton-lang.org/
MIT License
12.92k stars 1.57k forks source link

Support for PowerPC #3408

Open bbartoldson opened 6 months ago

bbartoldson commented 6 months ago

Please consider adding support for Power9 (e.g.) computers. Thanks!

Jokeren commented 6 months ago

You can build LLVM from scratch and build triton, right?

NavinKumarMNK commented 6 months ago

have you figured it out ? @Jokeren can u explain more detail how to do that. Thank you

NavinKumarMNK commented 6 months ago

i have done the llvm build as stated in the root/readme.md. still there was an error.

root@32ad8a05659a:~/triton# LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include \
  LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib \
  LLVM_SYSPATH=$LLVM_BUILD_DIR \
  pip install -e python
Obtaining file:///root/triton/python
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/root/miniconda3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/miniconda3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/root/miniconda3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
        File "/tmp/pip-build-env-fkntmjfb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
        File "/tmp/pip-build-env-fkntmjfb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-fkntmjfb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-fkntmjfb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-fkntmjfb/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 373, in <module>
        File "<string>", line 214, in download_and_copy
      KeyError: 'ppc64le'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
fkouteib commented 5 months ago

have you figured it out ? @Jokeren can u explain more detail how to do that. Thank you.

Hey @NavinKumarMNK I left a detailed comment on #3448 on how to resolve that issue and how to potentially overall enable PowerPC architecture in Triton repo. That should also address the error you refer to in the last comment.

@Jokeren Building Triton doesn't work as-is out of the box today for PowerPC hardware architecture. It would be a similar lift to what was done to add aarch64/arm64 support for building Triton from source. I believe support for building LLVM from source for PPC64 targets already exists in that project. But I don't have first hand experience with it.