{
  "id": 209313,
  "title": "TPU pytorch install question",
  "url": "/competitions/riiid-test-answer-prediction/discussion/209313",
  "author_name": "",
  "post_date": "2021-01-07T04:05:11.862210800Z",
  "votes": 2,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I found the files and execution code for the pytorch TPU installation,but it didn't work.<br>\nthe offline <a href=\"https://www.kaggle.com/joshi98kishan/pytorch-xla-setup-script\" target=\"_blank\">dataset </a><br>\ninstall code is <a href=\"https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train/comments\" target=\"_blank\">here</a>  </p>\n<blockquote>\n  <p>import collections<br>\n  from datetime import datetime, timedelta<br>\n  os.environ[\"XRT_TPU_CONFIG\"] = \"tpu_worker;0;10.0.0.2:8470\"</p>\n  <p>!export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH<br>\n  !dpkg -i /kaggle/input/pytorch-xla-setup-script/*.deb</p>\n  <p>_VersionConfig = collections.namedtuple('_VersionConfig', 'wheels,server')<br>\n  VERSION = \"torch_xla==nightly\"<br>\n  CONFIG = {<br>\n      'torch_xla==nightly': _VersionConfig('nightly', 'XRT-dev{}'.format(<br>\n          (datetime.today() - timedelta(1)).strftime('%Y%m%d')))}[VERSION]<br>\n  DIST_BUCKET = '/kaggle/input/pytorch-xla-setup-script'<br>\n  TORCH_WHEEL = 'torch-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)<br>\n  TORCH_XLA_WHEEL = 'torch_xla-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)<br>\n  TORCHVISION_WHEEL = 'torchvision-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)</p>\n  <p>!pip uninstall -y torch torchvision<br>\n  !cp \"$DIST_BUCKET/$TORCH_WHEEL\" .<br>\n  !cp \"$DIST_BUCKET/$TORCH_XLA_WHEEL\" .<br>\n  !cp \"$DIST_BUCKET/$TORCHVISION_WHEEL\" .<br>\n  !pip install \"$TORCH_WHEEL\"<br>\n  !pip install \"$TORCH_XLA_WHEEL\"<br>\n  !pip install \"$TORCHVISION_WHEEL\"</p>\n</blockquote>\n<p><code>ImportError: /opt/conda/lib/python3.7/site-packages/_XLAC.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at13_foreach_erf_EN3c108ArrayRefINS_6TensorEEE</code><br>\nI hope someone can tell me how to modify it to install successfully<br>\nthanks,</p>\n<p>thanks for the dataset and install code <a href=\"https://www.kaggle.com/cpmpml\" target=\"_blank\">@cpmpml</a>  <a href=\"https://www.kaggle.com/joshi98kishan\" target=\"_blank\">@joshi98kishan</a></p>",
  "messages": [
    {
      "id": "1141992",
      "postDate": "01/07/2021 04:05:11",
      "content": "<p>I found the files and execution code for the pytorch TPU installation,but it didn't work.<br>\nthe offline <a href=\"https://www.kaggle.com/joshi98kishan/pytorch-xla-setup-script\" target=\"_blank\">dataset </a><br>\ninstall code is <a href=\"https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train/comments\" target=\"_blank\">here</a>  </p>\n<blockquote>\n  <p>import collections<br>\n  from datetime import datetime, timedelta<br>\n  os.environ[\"XRT_TPU_CONFIG\"] = \"tpu_worker;0;10.0.0.2:8470\"</p>\n  <p>!export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH<br>\n  !dpkg -i /kaggle/input/pytorch-xla-setup-script/*.deb</p>\n  <p>_VersionConfig = collections.namedtuple('_VersionConfig', 'wheels,server')<br>\n  VERSION = \"torch_xla==nightly\"<br>\n  CONFIG = {<br>\n      'torch_xla==nightly': _VersionConfig('nightly', 'XRT-dev{}'.format(<br>\n          (datetime.today() - timedelta(1)).strftime('%Y%m%d')))}[VERSION]<br>\n  DIST_BUCKET = '/kaggle/input/pytorch-xla-setup-script'<br>\n  TORCH_WHEEL = 'torch-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)<br>\n  TORCH_XLA_WHEEL = 'torch_xla-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)<br>\n  TORCHVISION_WHEEL = 'torchvision-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)</p>\n  <p>!pip uninstall -y torch torchvision<br>\n  !cp \"$DIST_BUCKET/$TORCH_WHEEL\" .<br>\n  !cp \"$DIST_BUCKET/$TORCH_XLA_WHEEL\" .<br>\n  !cp \"$DIST_BUCKET/$TORCHVISION_WHEEL\" .<br>\n  !pip install \"$TORCH_WHEEL\"<br>\n  !pip install \"$TORCH_XLA_WHEEL\"<br>\n  !pip install \"$TORCHVISION_WHEEL\"</p>\n</blockquote>\n<p><code>ImportError: /opt/conda/lib/python3.7/site-packages/_XLAC.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at13_foreach_erf_EN3c108ArrayRefINS_6TensorEEE</code><br>\nI hope someone can tell me how to modify it to install successfully<br>\nthanks,</p>\n<p>thanks for the dataset and install code <a href=\"https://www.kaggle.com/cpmpml\" target=\"_blank\">@cpmpml</a>  <a href=\"https://www.kaggle.com/joshi98kishan\" target=\"_blank\">@joshi98kishan</a></p>",
      "rawMarkdown": "I found the files and execution code for the pytorch TPU installation,but it didn't work.\nthe offline [dataset ](https://www.kaggle.com/joshi98kishan/pytorch-xla-setup-script)\ninstall code is [here](https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train/comments)  \n> import collections\nfrom datetime import datetime, timedelta\nos.environ[\"XRT_TPU_CONFIG\"] = \"tpu_worker;0;10.0.0.2:8470\"\n\n\n> !export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\n!dpkg -i /kaggle/input/pytorch-xla-setup-script/*.deb\n\n> _VersionConfig = collections.namedtuple('_VersionConfig', 'wheels,server')\nVERSION = \"torch_xla==nightly\"\nCONFIG = {\n    'torch_xla==nightly': _VersionConfig('nightly', 'XRT-dev{}'.format(\n        (datetime.today() - timedelta(1)).strftime('%Y%m%d')))}[VERSION]\nDIST_BUCKET = '/kaggle/input/pytorch-xla-setup-script'\nTORCH_WHEEL = 'torch-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)\nTORCH_XLA_WHEEL = 'torch_xla-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)\nTORCHVISION_WHEEL = 'torchvision-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)\n\n\n> !pip uninstall -y torch torchvision\n!cp \"$DIST_BUCKET/$TORCH_WHEEL\" .\n!cp \"$DIST_BUCKET/$TORCH_XLA_WHEEL\" .\n!cp \"$DIST_BUCKET/$TORCHVISION_WHEEL\" .\n!pip install \"$TORCH_WHEEL\"\n!pip install \"$TORCH_XLA_WHEEL\"\n!pip install \"$TORCHVISION_WHEEL\"\n\n\n`ImportError: /opt/conda/lib/python3.7/site-packages/_XLAC.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at13_foreach_erf_EN3c108ArrayRefINS_6TensorEEE`\nI hope someone can tell me how to modify it to install successfully\nthanks,\n\nthanks for the dataset and install code @cpmpml  @joshi98kishan",
      "votes": null
    },
    {
      "id": "1141997",
      "postDate": "01/07/2021 04:17:04",
      "content": "<p>online code<br>\n!curl <a href=\"https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py\" target=\"_blank\">https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py</a> -o pytorch-xla-env-setup.py<br>\n!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev</p>",
      "rawMarkdown": "online code\n!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py\n!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev",
      "votes": null
    },
    {
      "id": "1142051",
      "postDate": "01/07/2021 05:27:57",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/yangxiaoshuai\" target=\"_blank\">@yangxiaoshuai</a> ,</p>\n<p>You can install PyTorch XLA offline using the dataset you have mentioned easily by following this notebook:</p>\n<p><a href=\"https://www.kaggle.com/joshi98kishan/foldtraining-pytorch-tpu-8-cores?scriptVersionId=48061653\" target=\"_blank\">https://www.kaggle.com/joshi98kishan/foldtraining-pytorch-tpu-8-cores?scriptVersionId=48061653</a></p>",
      "rawMarkdown": "Hello @yangxiaoshuai ,\n\nYou can install PyTorch XLA offline using the dataset you have mentioned easily by following this notebook:\n\nhttps://www.kaggle.com/joshi98kishan/foldtraining-pytorch-tpu-8-cores?scriptVersionId=48061653",
      "votes": null
    },
    {
      "id": "1142052",
      "postDate": "01/07/2021 05:31:36",
      "content": "<p>thank you👍</p>",
      "rawMarkdown": "thank you👍",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1141997,
      "author_name": "yangxiaoshuai",
      "author_url": "",
      "post_date": "01/07/2021 04:17:04",
      "content": "<p>online code<br>\n!curl <a href=\"https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py\" target=\"_blank\">https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py</a> -o pytorch-xla-env-setup.py<br>\n!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1142051,
      "author_name": "joshi98kishan",
      "author_url": "",
      "post_date": "01/07/2021 05:27:57",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/yangxiaoshuai\" target=\"_blank\">@yangxiaoshuai</a> ,</p>\n<p>You can install PyTorch XLA offline using the dataset you have mentioned easily by following this notebook:</p>\n<p><a href=\"https://www.kaggle.com/joshi98kishan/foldtraining-pytorch-tpu-8-cores?scriptVersionId=48061653\" target=\"_blank\">https://www.kaggle.com/joshi98kishan/foldtraining-pytorch-tpu-8-cores?scriptVersionId=48061653</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1142052,
          "author_name": "yangxiaoshuai",
          "author_url": "",
          "post_date": "01/07/2021 05:31:36",
          "content": "<p>thank you👍</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1141992": "I found the files and execution code for the pytorch TPU installation,but it didn't work.\nthe offline [dataset ](https://www.kaggle.com/joshi98kishan/pytorch-xla-setup-script)\ninstall code is [here](https://www.kaggle.com/cpmpml/tpu-sub-bs256-full-train/comments)  \n> import collections\nfrom datetime import datetime, timedelta\nos.environ[\"XRT_TPU_CONFIG\"] = \"tpu_worker;0;10.0.0.2:8470\"\n\n\n> !export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\n!dpkg -i /kaggle/input/pytorch-xla-setup-script/*.deb\n\n> _VersionConfig = collections.namedtuple('_VersionConfig', 'wheels,server')\nVERSION = \"torch_xla==nightly\"\nCONFIG = {\n    'torch_xla==nightly': _VersionConfig('nightly', 'XRT-dev{}'.format(\n        (datetime.today() - timedelta(1)).strftime('%Y%m%d')))}[VERSION]\nDIST_BUCKET = '/kaggle/input/pytorch-xla-setup-script'\nTORCH_WHEEL = 'torch-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)\nTORCH_XLA_WHEEL = 'torch_xla-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)\nTORCHVISION_WHEEL = 'torchvision-{}-cp37-cp37m-linux_x86_64.whl'.format(CONFIG.wheels)\n\n\n> !pip uninstall -y torch torchvision\n!cp \"$DIST_BUCKET/$TORCH_WHEEL\" .\n!cp \"$DIST_BUCKET/$TORCH_XLA_WHEEL\" .\n!cp \"$DIST_BUCKET/$TORCHVISION_WHEEL\" .\n!pip install \"$TORCH_WHEEL\"\n!pip install \"$TORCH_XLA_WHEEL\"\n!pip install \"$TORCHVISION_WHEEL\"\n\n\n`ImportError: /opt/conda/lib/python3.7/site-packages/_XLAC.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at13_foreach_erf_EN3c108ArrayRefINS_6TensorEEE`\nI hope someone can tell me how to modify it to install successfully\nthanks,\n\nthanks for the dataset and install code @cpmpml  @joshi98kishan",
    "1141997": "online code\n!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py\n!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev",
    "1142051": "Hello @yangxiaoshuai ,\n\nYou can install PyTorch XLA offline using the dataset you have mentioned easily by following this notebook:\n\nhttps://www.kaggle.com/joshi98kishan/foldtraining-pytorch-tpu-8-cores?scriptVersionId=48061653",
    "1142052": "thank you👍"
  },
  "source": "meta"
}