hipBLASLt icon indicating copy to clipboard operation
hipBLASLt copied to clipboard

[Issue]: ModuleNotFoundError: No module named 'Tensile'

Open vbayanag opened this issue 8 months ago • 3 comments

Problem Description

I'm trying to install hipBLASLt on rocm/pytorch:rocm6.3.4_ubuntu22.04_py3.10_pytorch_release_2.4.0 image. I cloned hipBLASLt repo and installed it on develop branch. Ran into an error when I invoke tensilelite using the command

./hipBLASLt/tensilelite/Tensile/bin/Tensile /home/vbayanag/phi4/BBS_TN_MI300X.yaml .

Here's the error-

Traceback (most recent call last):
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/bin/Tensile", line 28, in <module>
    from Tensile import Tensile
ModuleNotFoundError: No module named 'Tensile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/bin/Tensile", line 35, in <module>
    from Tensile import Tensile
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/Tensile.py", line 46, in <module>
    from Tensile.Toolchain.Assembly import AssemblyToolchain, makeAssemblyToolchain
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/Toolchain/Assembly.py", line 35, in <module>
    from ..SolutionStructs import Solution
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/SolutionStructs/__init__.py", line 1, in <module>
    from .Naming import *
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/SolutionStructs/Naming.py", line 31, in <module>
    from .Problem import ProblemType
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/SolutionStructs/Problem.py", line 25, in <module>
    from rocisa.enum import DataTypeEnum
ModuleNotFoundError: No module named 'rocisa.enum'

Tried pip install rocisa-

ERROR: Could not find a version that satisfies the requirement rocisa (from versions: none)

Please let us know if there's a working tagged build for rocm6.3.4 image. Thanks.

Operating System

Ubuntu 22.04.5 LTS

CPU

Intel(R) Xeon(R) Platinum 8480+

GPU

Other

Other

MI300X

ROCm Version

ROCm 6.2.3

ROCm Component

No response

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

ROcm 6.3.4 is used but it's not listed in the listdown, hence slected the latest available there.

Additional Information

No response

vbayanag avatar Apr 12 '25 01:04 vbayanag

We debugged this this afternoon - it's the same issue as https://github.com/ROCm/hipBLASLt/issues/1886#issuecomment-2795355191, and extra points to note include that

  • pip install rocisa/ has to be run with the trailing slash
  • it has to be run from the ~/hipBLASLt/tensilelite folder

because we're installing a package from the local copy of the directory at https://github.com/ROCm/hipBLASLt/tree/develop/tensilelite/rocisa

dwiddows avatar Apr 14 '25 23:04 dwiddows

Hey @dwiddows , Thanks for your help, it has helped finish installation process. Although, I'm still running into errors when I use tensilelite to tune GEMM kernels-

-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "/data/home/vbayanag/hipBLASLt/./tensilelite/Tensile/bin/Tensile", line 39, in <module>
    Tensile.main()
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/Tensile.py", line 538, in main
    Tensile(sys.argv[1:])
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/Tensile.py", line 495, in Tensile
    executeStepsInConfig(config, outputPath, asmToolchain, srcToolchain, isaInfoMap, cCompiler, debugConfig, depthUConfig, device_id)
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/Tensile.py", line 99, in executeStepsInConfig
    BenchmarkProblems.main(
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/BenchmarkProblems.py", line 523, in main
    ClientExecutable.getClientExecutable(str(srcToolchain.compiler.path), cCompiler, outputPath)
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/ClientExecutable.py", line 90, in getClientExecutable
    buildEnv.generate()
  File "/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/ClientExecutable.py", line 49, in generate
    subprocess.check_call(args, cwd=ensurePath(self.buildDir))
  File "/opt/conda/envs/py_3.10/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-D', 'CMAKE_BUILD_TYPE=Release', '-D', 'TENSILE_USE_MSGPACK=ON', '-D', 'TENSILE_USE_LLVM=ON', '-D', 'Tensile_LIBRARY_FORMAT=yaml', '-D', 'Tensile_ENABLE_MARKER=False', '-D', 'CMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++', '-D', 'CMAKE_C_COMPILER=/opt/rocm/bin/amdclang', '/data/home/vbayanag/hipBLASLt/tensilelite/Tensile/Source']' returned non-zero exit status 1.

vbayanag avatar Apr 15 '25 19:04 vbayanag

Eek. I haven't seen this before, it might depend on your docker setup, the details of your ./install.sh command.

I have had to run commands before including

sudo apt-get update
sudo apt install libmsgpack-dev
sudo apt install libboost-all-dev

So I wonder if 'TENSILE_USE_MSGPACK=ON' might cause an error if libmsgpack-dev isn't installed? (Guesswork only.)

dwiddows avatar Apr 15 '25 20:04 dwiddows

This issue has been migrated to: https://github.com/ROCm/rocm-libraries/issues/312

Closing the issue in this repo. Please refer to the migrated issue for updates.

idass1990 avatar Jun 20 '25 21:06 idass1990