{
  "id": 321814,
  "title": "PYTORCH+TPU doesnt work.What is wrong?",
  "url": "/competitions/birdclef-2022/discussion/321814",
  "author_name": "Andrij",
  "post_date": "2022-04-28T19:09:22.074000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hi to all! <br>\nI want to customize the pytorch notebook so that it runs on TPU. <br>\nBut I'm getting an error:<br>\nRuntimeError: Internal: From /job:tpu_worker/replica:0/task:0:<br>\n2 root error(s) found.<br>\n  (0) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.<br>\n     [[{{node XRTCompile}}]]<br>\n  (1) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.<br>\n     [[{{node XRTCompile}}]]<br>\n     [[XRTCompile_G3]]<br>\n0 successful operations.<br>\n0 derived errors ignored.</p>\n<p>Here is my notebook so you can see the error: <br>\n<a href=\"https://www.kaggle.com/code/aikhmelnytskyy/birdclef2022pytorch-tpu-doesnt-work-what-is-wrong\" target=\"_blank\">https://www.kaggle.com/code/aikhmelnytskyy/birdclef2022pytorch-tpu-doesnt-work-what-is-wrong</a></p>\n<p>What do you say, there is a chance to solve this problem)? </p>\n<p>P.S. I see this discussion <a href=\"https://www.kaggle.com/competitions/birdclef-2022/discussion/321202\" target=\"_blank\">https://www.kaggle.com/competitions/birdclef-2022/discussion/321202</a> and I emphasize that I published the notebook just to make it easier to identify the error.</p>",
  "messages": [
    {
      "id": 1770960,
      "postDate": "2022-04-28T19:09:22.073Z",
      "content": "<p>Hi to all! <br>\nI want to customize the pytorch notebook so that it runs on TPU. <br>\nBut I'm getting an error:<br>\nRuntimeError: Internal: From /job:tpu_worker/replica:0/task:0:<br>\n2 root error(s) found.<br>\n  (0) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.<br>\n     [[{{node XRTCompile}}]]<br>\n  (1) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.<br>\n     [[{{node XRTCompile}}]]<br>\n     [[XRTCompile_G3]]<br>\n0 successful operations.<br>\n0 derived errors ignored.</p>\n<p>Here is my notebook so you can see the error: <br>\n<a href=\"https://www.kaggle.com/code/aikhmelnytskyy/birdclef2022pytorch-tpu-doesnt-work-what-is-wrong\" target=\"_blank\">https://www.kaggle.com/code/aikhmelnytskyy/birdclef2022pytorch-tpu-doesnt-work-what-is-wrong</a></p>\n<p>What do you say, there is a chance to solve this problem)? </p>\n<p>P.S. I see this discussion <a href=\"https://www.kaggle.com/competitions/birdclef-2022/discussion/321202\" target=\"_blank\">https://www.kaggle.com/competitions/birdclef-2022/discussion/321202</a> and I emphasize that I published the notebook just to make it easier to identify the error.</p>",
      "rawMarkdown": "Hi to all! \nI want to customize the pytorch notebook so that it runs on TPU. \nBut I'm getting an error:\nRuntimeError: Internal: From /job:tpu_worker/replica:0/task:0:\n2 root error(s) found.\n  (0) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.\n\t [[{{node XRTCompile}}]]\n  (1) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.\n\t [[{{node XRTCompile}}]]\n\t [[XRTCompile_G3]]\n0 successful operations.\n0 derived errors ignored.\n\nHere is my notebook so you can see the error: \nhttps://www.kaggle.com/code/aikhmelnytskyy/birdclef2022pytorch-tpu-doesnt-work-what-is-wrong\n\nWhat do you say, there is a chance to solve this problem)? \n\nP.S. I see this discussion https://www.kaggle.com/competitions/birdclef-2022/discussion/321202 and I emphasize that I published the notebook just to make it easier to identify the error.",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1770960": "Hi to all! \nI want to customize the pytorch notebook so that it runs on TPU. \nBut I'm getting an error:\nRuntimeError: Internal: From /job:tpu_worker/replica:0/task:0:\n2 root error(s) found.\n  (0) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.\n\t [[{{node XRTCompile}}]]\n  (1) Internal: Seen floating point types of different precisions in %batch-norm-training.383 = (f16[16,32,112,157]{3,2,1,0}, f16[32]{0}, f16[32]{0}) batch-norm-training(f16[16,32,112,157]{3,2,1,0} %convolution.382, bf16[32]{0} %p142.328, bf16[32]{0} %p141.327), epsilon=0.001, feature_index=1, but mixed precision is disallowed.\n\t [[{{node XRTCompile}}]]\n\t [[XRTCompile_G3]]\n0 successful operations.\n0 derived errors ignored.\n\nHere is my notebook so you can see the error: \nhttps://www.kaggle.com/code/aikhmelnytskyy/birdclef2022pytorch-tpu-doesnt-work-what-is-wrong\n\nWhat do you say, there is a chance to solve this problem)? \n\nP.S. I see this discussion https://www.kaggle.com/competitions/birdclef-2022/discussion/321202 and I emphasize that I published the notebook just to make it easier to identify the error."
  }
}