Skip to content

[Bug] PyTorch and TVM loading problem due to conflicting LLVM symbols #9362

@masahi

Description

@masahi

Apparently, the new PyTorch release crashes with symbols loaded by TVM, so the following trivial code crashes with invalid pointer Aborted (core dumped) upon exit:

import tvm
import torch

We can workaround this by swapping the import order, but as pointed out in #9349 (comment) this may not always be possible.

Another solution is to remove the use of RTLD_GLOBAL in

lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)

See related issues in other repos that moved away from using RTLD_GLOBAL.
dmlc/dgl#2255
pytorch/pytorch#28536
pytorch/pytorch#3059

Is there any particular reason we are using RTLD_GLOBAL? @tqchen @areusch

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions