jplu opened a new issue, #11387:
URL: https://github.com/apache/tvm/issues/11387
I'm using a TVM model into a Swift app. The way I do it is that I code all
the TVM related stuff in C++ using the `libtvm_runtime.dylib` and then call it
from Swift. The model I have is targeted for Metal. Everything is working fine
when I run the app from the CLI, but crashs when I run the tests. Please note
that the CPU version of the model works as expected including during the tests.
### Expected behavior
Tests are working with the Metal version of the model.
### Actual behavior
The Metal version of the model crashs when running the tests.
### Environment
OS version: MacOS Monterey 12.4
TVM version: Commit 8d4f4dd73ff2d762ade38aa0f9e8e9fba5f933da
### Steps to reproduce
Difficult to reproduce but I can give many details. The call that crashs in
my code is:
```
tvm::runtime::Module gmod = this->model.GetFunction("default")(dev);
```
Where `dev` is defined by:
```
DLDevice dev = {kDLMetal, 0};
```
I have also made so screen shots of the stack trace. First call:

Second call:

Third call:

Fourth call:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]