apache / apache/tvm

[Bug] [CUDA] not compilable with CUDA 11.4 due to missing symbols

Open
#17,771 1 comment 0 reactions 0 assignees View on GitHub
needs-triage type: bug
Dominant language
Python
Stars
13.7k
Forks
4k
Avg merge
2d 19h
Merged PRs (30d)
111

Description

TVM is not compilable with CUDA 11.4 due to missing symbols
_CUDA_R_8F_E4M3_ and _CUBLASLT_MATMUL_DESC_A_SCALE_POINTER_
(Which have been introduced in CUDA 12.x afaik)

### Expected behavior

successful compile

### Actual behavior
```
406.2 /opt/tvm/src/runtime/contrib/cublas/cublas.cc:169:15: error: 'CUDA_R_8F_E4M3' was not declared in this scope
406.2 169 | ab_type = CUDA_R_8F_E4M3;
406.2 | ^~~~~~~~~~~~~~
406.2 In file included from /opt/tvm/src/runtime/contrib/cublas/cublas.cc:29:
406.2 /opt/tvm/src/runtime/contrib/cublas/cublas.cc:199:64: error: 'CUBLASLT_MATMUL_DESC_A_SCALE_POINTER' was not declared in this scope; did you mean 'CUBLASLT_MATMUL_DESC_BIAS_POINTER'?
406.2 199 | CHECK_CUBLAS_ERROR(cublasLtMatmulDescSetAttribute(op_desc, CUBLASLT_MATMUL_DESC_A_SCALE_POINTER,
406.2 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406.2 /opt/tvm/src/runtime/contrib/cublas/cublas_utils.h:69:34: note: in definition of macro 'CHECK_CUBLAS_ERROR'
406.2 69 | int error = static_cast(fn); \
406.2 | ^~
406.2 /opt/tvm/src/runtime/contrib/cublas/cublas.cc:204:64: error: 'CUBLASLT_MATMUL_DESC_B_SCALE_POINTER' was not declared in this scope; did you mean 'CUBLASLT_MATMUL_DESC_BIAS_POINTER'?
406.2 204 | CHECK_CUBLAS_ERROR(cublasLtMatmulDescSetAttribute(op_desc, CUBLASLT_MATMUL_DESC_B_SCALE_POINTER,
406.2 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406.2 /opt/tvm/src/runtime/contrib/cublas/cublas_utils.h:69:34: note: in definition of macro 'CHECK_CUBLAS_ERROR'
```
406.2 69 | int error = static_cast(fn);

### Environment
should not really matter, but:
Ubuntu 20.04 in docker (x86_64)
CUDA 11.4

* needs-triage

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/runtime/contrib/cublas/cublas.cc at lines 169, 199, and 204, then inspect src/runtime/contrib/cublas/cublas_utils.h around line 69 and the CUDA 11.4 headers. Verify the integration's behavior with CUDA 11.4; done means TVM compiles successfully without the reported missing-symbol errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.