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:
[email protected]


Reply via email to