Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TensileCreateLibrary prepAsm error #1347

Closed
Huangxt57 opened this issue Jul 28, 2023 · 5 comments
Closed

[Bug]: TensileCreateLibrary prepAsm error #1347

Huangxt57 opened this issue Jul 28, 2023 · 5 comments

Comments

@Huangxt57
Copy link

Huangxt57 commented Jul 28, 2023

Describe the bug

Tensile Python script reports error when building rocBLAS 5.5.0

To Reproduce

The CMake configure command is:

CXX=$HOME/opt/rocm/5.5.0/bin/hipcc \
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DAMDGPU_TARGETS="gfx1030" \
    -DROCM_PATH=$HOME/opt/rocm/5.5.0/lib/cmake \
    -DCMAKE_MODULE_PATH=$HOME/opt/rocm/5.5.0 \
    -DCMAKE_PREFIX_PATH=$HOME/opt/rocm/5.5.0 \
    -DTensile_LOGIC=asm_full \
    -DTensile_ARCHITECTURE="gfx1030" \
    -DTensile_CODE_OBJECT_VERSION=default \
    -DTensile_LIBRARY_FORMAT=yaml \
    -DRUN_HEADER_TESTING=OFF \
    -DCPACK_SET_DESTDIR=OFF \
    -DCMAKE_INSTALL_PREFIX=$HOME/opt/rocm/5.5.0
# Writing Custom CMake
# Writing Kernels...
Traceback (most recent call last):
  File "/mnt/data/home/amd/tmp/rocm.5.5.0/rocBLAS-rocm-5.5.0/build/virtualenv/lib/python3.10/site-package
s/Tensile/bin/TensileCreateLibrary", line 43, in <module>
    TensileCreateLibrary()
  File "/mnt/data/home/amd/tmp/rocm.5.5.0/rocBLAS-rocm-5.5.0/build/virtualenv/lib/python3.10/site-package
s/Tensile/TensileCreateLibrary.py", line 1354, in TensileCreateLibrary
    codeObjectFiles = writeSolutionsAndKernels(outputPath, CxxCompiler, None, solutions,
  File "/mnt/data/home/amd/tmp/rocm.5.5.0/rocBLAS-rocm-5.5.0/build/virtualenv/lib/python3.10/site-package
s/Tensile/TensileCreateLibrary.py", line 511, in writeSolutionsAndKernels
    prepAsm(kernelWriterAssembly)
  File "/mnt/data/home/amd/tmp/rocm.5.5.0/rocBLAS-rocm-5.5.0/build/virtualenv/lib/python3.10/site-package
s/Tensile/TensileCreateLibrary.py", line 387, in prepAsm
    assemblerFile.write(" ".join(cArgs32) + "\n")
TypeError: sequence item 0: expected str instance, NoneType found
ninja: build stopped: subcommand failed.

Environment

Hardware description
CPU 5950X
GPU 6900XT
@rkamd
Copy link
Contributor

rkamd commented Jul 28, 2023

@Huangxt57 ,
Could you please provide the following information,
Make sure that ROCm is correctly installed and to capture detailed environment information run the following command:

printf '=== environment\n' > environment.txt &&
printf '\n\n=== date\n' >> environment.txt && date >> environment.txt &&
printf '\n\n=== Linux Kernel\n' >> environment.txt && uname -a  >> environment.txt &&
printf '\n\n=== rocm-smi' >> environment.txt && rocm-smi  >> environment.txt &&
printf '\n\n' >> environment.txt && hipconfig  >> environment.txt &&
printf '\n\n=== rocminfo\n' >> environment.txt && rocminfo  >> environment.txt &&
printf '\n\n=== lspci VGA\n' >> environment.txt && lspci | grep -i vga >> environment.txt

Attach environment.txt

Also, attach the build log as well.

@Huangxt57
Copy link
Author

environment.txt
cmake.log

The necessary attachments are uploaded.

@Huangxt57
Copy link
Author

Huangxt57 commented Jul 29, 2023

It could be resolved after I use the 5.6.0 version and specify environment variable TENSILE_ROCM_ASSEMBLER_PATH to the path of clang.

@rkamd
Copy link
Contributor

rkamd commented Aug 2, 2023

@Huangxt57 ,
I am unable to reproduce the error.

From the attached cmake.log, I see that the Tensile build script is unable to resolve the hipcc and assembler path. could you check if the valid path is set?

# Tensile Create Library
Tensile::WARNING: Did not detect SupportedISA: [(8, 0, 3), (9, 0, 0), (9, 0, 6), (9, 0, 8), (9, 0, 10), (10, 1, 0), (10, 1, 1), (10, 1, 2), (10, 3, 0), (10, 3, 1), (11, 0, 0), (11, 0, 1), (11, 0, 2)]; cannot benchmark assembly kernels.
Tensile::WARNING: Error: hipcc running --version [Errno 2] No such file or directory: 'hipcc' 
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified
Tensile::WARNING: Assembler not present, asm caps loaded from cache are unverified

@Huangxt57
Copy link
Author

It has been fixed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants