{
  "id": 148752,
  "title": "Share great guide how to use TPU",
  "url": "/competitions/alaska2-image-steganalysis/discussion/148752",
  "author_name": "Tuấn Lương",
  "post_date": "2020-05-05T14:39:34.458000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>This uses a public dataset that contains what is needed to install Pytorch.</p>\n\n<p>Dataset: <a href=\"https://www.kaggle.com/cpmpml/torchxla\">https://www.kaggle.com/cpmpml/torchxla</a></p>\n\n<p>Test notebook: <a href=\"https://www.kaggle.com/cpmpml/tpu-test\">https://www.kaggle.com/cpmpml/tpu-test</a></p>\n\n<p>A more realistic code: <a href=\"https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train\">https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train</a></p>\n\n<p>Just look where xm or device is used to see where you code may need to be modified.</p>\n\n<p>The above uses only one TPU core. To use the 8 cores you need parallel code. Go to here for see an example <a href=\"https://www.kaggle.com/dhananjay3/pytorch-xla-for-tpu-with-multiprocessing\">https://www.kaggle.com/dhananjay3/pytorch-xla-for-tpu-with-multiprocessing</a></p>",
  "messages": [
    {
      "id": 834437,
      "postDate": "2020-05-05T14:39:34.460Z",
      "content": "<p>This uses a public dataset that contains what is needed to install Pytorch.</p>\n\n<p>Dataset: <a href=\"https://www.kaggle.com/cpmpml/torchxla\">https://www.kaggle.com/cpmpml/torchxla</a></p>\n\n<p>Test notebook: <a href=\"https://www.kaggle.com/cpmpml/tpu-test\">https://www.kaggle.com/cpmpml/tpu-test</a></p>\n\n<p>A more realistic code: <a href=\"https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train\">https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train</a></p>\n\n<p>Just look where xm or device is used to see where you code may need to be modified.</p>\n\n<p>The above uses only one TPU core. To use the 8 cores you need parallel code. Go to here for see an example <a href=\"https://www.kaggle.com/dhananjay3/pytorch-xla-for-tpu-with-multiprocessing\">https://www.kaggle.com/dhananjay3/pytorch-xla-for-tpu-with-multiprocessing</a></p>",
      "rawMarkdown": "This uses a public dataset that contains what is needed to install Pytorch.\n\nDataset: https://www.kaggle.com/cpmpml/torchxla\n\nTest notebook: https://www.kaggle.com/cpmpml/tpu-test\n\nA more realistic code: https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train\n\nJust look where xm or device is used to see where you code may need to be modified.\n\nThe above uses only one TPU core. To use the 8 cores you need parallel code. Go to here for see an example https://www.kaggle.com/dhananjay3/pytorch-xla-for-tpu-with-multiprocessing\n",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "834437": "This uses a public dataset that contains what is needed to install Pytorch.\n\nDataset: https://www.kaggle.com/cpmpml/torchxla\n\nTest notebook: https://www.kaggle.com/cpmpml/tpu-test\n\nA more realistic code: https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train\n\nJust look where xm or device is used to see where you code may need to be modified.\n\nThe above uses only one TPU core. To use the 8 cores you need parallel code. Go to here for see an example https://www.kaggle.com/dhananjay3/pytorch-xla-for-tpu-with-multiprocessing\n"
  }
}