You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/05/06 15:19:34 UTC

[GitHub] [tvm] daniperfer opened a new issue #7990: LLVM ERROR: out of memory, when tracing maskrcnn model in deploy_object_detection_pytorch.py tutorial

daniperfer opened a new issue #7990:
URL: https://github.com/apache/tvm/issues/7990


   Hi:
   
   I am trying to follow the tutorial in `tutorials/frontend/deploy_object_detection_pytorch.py`, but got the following error: **LLVM ERROR: out of memory. Aborted (core dumped)**.
   
   First of all, I have built and installed TVM according to the steps described in the [Host setup and docker build](https://tvm.apache.org/docs/deploy/vitis_ai.html#host-setup-and-docker-build) section of Vitis-AI integration tutorial.
   
   I used the `0.8.dev0` version of TVM, and:
       torch version `1.7.0`
       torchvision version `0.8.1`
   
   Then, I launched the tutorial script under the pytorch conda environment, inside docker:
   
       python tutorials/frontend/deploy_object_detection_pytorch.py
   
   And I got that LLVM out of memory error...
   
   Do you have any thoughts on why this error could have happened?
   
   ```
   (my-vitis-ai-pytorch) Vitis-AI ~/tvm > python tutorials/frontend/deploy_object_detection_pytorch.py
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torch/tensor.py:593: RuntimeWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results).
     'incorrect results).', category=RuntimeWarning)
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torch/nn/functional.py:3123: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
     dtype=torch.float32)).float())) for i in range(dim)]
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torchvision/models/detection/anchor_utils.py:147: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
     torch.tensor(image_size[1] // g[1], dtype=torch.int64, device=device)] for g in grid_sizes]
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torchvision/ops/boxes.py:128: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
     boxes_x = torch.min(boxes_x, torch.tensor(width, dtype=boxes.dtype, device=boxes.device))
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torchvision/ops/boxes.py:130: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
     boxes_y = torch.min(boxes_y, torch.tensor(height, dtype=boxes.dtype, device=boxes.device))
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torchvision/models/detection/transform.py:271: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
     for s, s_orig in zip(new_size, original_size)
   /home/vitis-ai-user/.conda/envs/my-vitis-ai-pytorch/lib/python3.6/site-packages/torchvision/models/detection/roi_heads.py:372: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
     return torch.tensor(M + 2 * padding).to(torch.float32) / torch.tensor(M).to(torch.float32)
   LLVM ERROR: out of memory
   Aborted (core dumped)
   ```
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] daniperfer commented on issue #7990: LLVM ERROR: out of memory, when tracing maskrcnn model in deploy_object_detection_pytorch.py tutorial

Posted by GitBox <gi...@apache.org>.
daniperfer commented on issue #7990:
URL: https://github.com/apache/tvm/issues/7990#issuecomment-993219644


   I posted a question about this in the TVM discussion forums, in which I described how to change LLVM version. Unfortunately, it doesn't work for me :(, and I couldn't find a solution...
   This is the question: https://discuss.tvm.apache.org/t/llvm-error-when-tracing-maskrcnn-model-in-pytorch-object-detection-tutorial/10066


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen closed issue #7990: LLVM ERROR: out of memory, when tracing maskrcnn model in deploy_object_detection_pytorch.py tutorial

Posted by GitBox <gi...@apache.org>.
tqchen closed issue #7990:
URL: https://github.com/apache/tvm/issues/7990


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on issue #7990: LLVM ERROR: out of memory, when tracing maskrcnn model in deploy_object_detection_pytorch.py tutorial

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7990:
URL: https://github.com/apache/tvm/issues/7990#issuecomment-840879447


   Thanks for asking the question, please try to change the LLVM version, followup questions can be asked in https://discuss.tvm.apache.org/


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] abdulazizm commented on issue #7990: LLVM ERROR: out of memory, when tracing maskrcnn model in deploy_object_detection_pytorch.py tutorial

Posted by GitBox <gi...@apache.org>.
abdulazizm commented on issue #7990:
URL: https://github.com/apache/tvm/issues/7990#issuecomment-992694906


   @daniperfer sorry i am newbie, how can we change this llvm version? Is there any blog or documentation that you refer?


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on issue #7990: LLVM ERROR: out of memory, when tracing maskrcnn model in deploy_object_detection_pytorch.py tutorial

Posted by GitBox <gi...@apache.org>.
masahi commented on issue #7990:
URL: https://github.com/apache/tvm/issues/7990#issuecomment-833851443


   Can you try different LLVM installation? This is an error coming from LLVM, there is not much we can do about it. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org