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:
   ![Capture d’écran 2022-05-20 à 10 45 
29](https://user-images.githubusercontent.com/959590/169505742-56589aa4-ab66-4631-b541-e819623acef5.png)
   
   Second call:
   ![Capture d’écran 2022-05-20 à 10 45 
06](https://user-images.githubusercontent.com/959590/169505775-ea59c0af-fdd1-40b6-a0b4-0db489f3a9ba.png)
   
   Third call:
   ![Capture d’écran 2022-05-20 à 10 44 
37](https://user-images.githubusercontent.com/959590/169505809-2db5abaf-5dba-4842-bc3b-31b38c956cc4.png)
   
   Fourth call:
   ![Capture d’écran 2022-05-20 à 10 44 
16](https://user-images.githubusercontent.com/959590/169505842-2567a5ff-7ff2-4142-adce-23a32976587d.png)
   
   
   
   


-- 
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]

Reply via email to