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

[Feature Request]: MLIR CodeGen 支持libdevice相关符号__nv_** #10191

Closed
howin98 opened this issue Apr 25, 2023 · 3 comments
Closed

[Feature Request]: MLIR CodeGen 支持libdevice相关符号__nv_** #10191

howin98 opened this issue Apr 25, 2023 · 3 comments
Assignees

Comments

@howin98
Copy link
Contributor

howin98 commented Apr 25, 2023

Background and motivation

MLIR CodeGen中 _nv**符号在使用SerializeToCubinPass中会出现相关符号的未定义错误,通过链接libdevice进行解决

API Proposal

def new_api(value: Tensor) -> Tensor:
  pass

API Usage

No response

Alternatives

No response

Risks

No response

@howin98
Copy link
Contributor Author

howin98 commented Apr 25, 2023

当前路径尝试1 :将bc编译成ptx,然后参与culinkaddfile

cp /usr/local/cuda/nvvm/libdevice/libdevice.10.bc .
llc -mcpu=sm_60   -mattr=+ptx60 libdevice.10.bc -o libdevice.10.ptx
  RETURN_ON_CUDA_ERROR(cuLinkAddFile(linkState, CUjitInputType::CU_JIT_INPUT_PTX,
                                     "libdevice.10.ptx",
                                     0,       /* number of jit options */
                                     nullptr, /* jit options */
                                     nullptr  /* jit option values */
                                     ));

结果1:成功链接,但是pass后端出现新报错
image

@howin98
Copy link
Contributor Author

howin98 commented Apr 25, 2023

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

No branches or pull requests

1 participant