Skip to content

[Bug] Get Function("run") runned in std::thread ,the thread would not exit correctly #13546

@SZNero

Description

@SZNero

Expected behavior

i want it run in std::thread to do a job, and exit correctly.but faild.

Actual behavior

when the thread exit,it will throw a exception called urctbase.pdb not loaded.

Environment

vs 2019 and vs2022 happended the same thing.
cuda 10.1
i tried tvm v0.10.0 and v0.11.0

Steps to reproduce

 void test(){
    myTvmClass tvm;
   tvm.loadModule();
cv::Mat image = cv::imread(path);
tvm.run(image);

}
int main(){
std::thread(test).join();
return 0;
}

the error message is:

Exception thrown at 0x00007FFA40B0039C in tvmThreadTest.exe: Microsoft C++ exception: tvm::runtime::InternalError at memory location 0x000000EF98FFF960.
Unhandled exception at 0x00007FFA4109F61E (ucrtbase.dll) in tvmThreadTest.exe: Fatal program exit requested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions