Skip to content

[Bug] import tvm before pytorch leads to core dump at the end #12326

Description

@mikeseven

Expected behavior

order of import should not matter

Actual behavior

import tvm
import torch

At the end, the application quits with

free(): invalid pointer
Aborted (core dumped)

However, importing tvm after all other imports works

import torch
import tvm

To reproduce, there is no need to even do anything with tvm in the code!

Environment

TVM main branch, same error with latest tags too

  • same error built with or without cuda
  • same error built with llvm-config --link-static or without

Ubuntu 20.04, x86
tested with clean conda environment with pytorch 1.11 and 1.12 + cudatoolkit

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions