{
  "id": 301857,
  "title": "Is GPU used during submission testing?",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/301857",
  "author_name": "",
  "post_date": "2022-01-19T19:07:51.189479900Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<ol>\n<li>I have a lack in understanding if GPU is used during background score calculation after I made a submission.</li>\n<li>I also saw instructions that in order to use GPU, some modifications should be done in code and not only in settings, but I didn't get what actually should be done. On my local computer training and inference is running on GPU by definition and I use <code>with tf.device(\"/cpu\"):</code> if I want to redirect execution to CPU. What should be done in kaggle?</li>\n</ol>\n<p>PS. I just checked the time for my notebook on kaggle and it looks like inference takes about 3.5 seconds per image, which is a way more than I have on my local computer - less than 200 milli-seconds per frame for GPU inference and CPU post-processing.<br>\nHow can it be improved?</p>",
  "messages": [
    {
      "id": "1656919",
      "postDate": "01/19/2022 19:07:51",
      "content": "<ol>\n<li>I have a lack in understanding if GPU is used during background score calculation after I made a submission.</li>\n<li>I also saw instructions that in order to use GPU, some modifications should be done in code and not only in settings, but I didn't get what actually should be done. On my local computer training and inference is running on GPU by definition and I use <code>with tf.device(\"/cpu\"):</code> if I want to redirect execution to CPU. What should be done in kaggle?</li>\n</ol>\n<p>PS. I just checked the time for my notebook on kaggle and it looks like inference takes about 3.5 seconds per image, which is a way more than I have on my local computer - less than 200 milli-seconds per frame for GPU inference and CPU post-processing.<br>\nHow can it be improved?</p>",
      "rawMarkdown": "1. I have a lack in understanding if GPU is used during background score calculation after I made a submission.\n2. I also saw instructions that in order to use GPU, some modifications should be done in code and not only in settings, but I didn't get what actually should be done. On my local computer training and inference is running on GPU by definition and I use `with tf.device(\"/cpu\"):` if I want to redirect execution to CPU. What should be done in kaggle?\n\nPS. I just checked the time for my notebook on kaggle and it looks like inference takes about 3.5 seconds per image, which is a way more than I have on my local computer - less than 200 milli-seconds per frame for GPU inference and CPU post-processing.\nHow can it be improved?",
      "votes": null
    },
    {
      "id": "1656943",
      "postDate": "01/19/2022 19:34:26",
      "content": "<p>based on the model you use,  look up some example first to copy with. why not GPU ?   </p>",
      "rawMarkdown": "based on the model you use,  look up some example first to copy with. why not GPU ?",
      "votes": null
    },
    {
      "id": "1656945",
      "postDate": "01/19/2022 19:38:01",
      "content": "<p>Background submission algo:</p>\n<ol>\n<li>Look into notebook settings -&gt; Accelerator -&gt; GPU …. backend run notebook in GPU enviroment ….</li>\n<li>but …. you have to … use GPU :) …. some of frameworks use it by default … some … you have to send model/data to CUDA</li>\n</ol>",
      "rawMarkdown": "Background submission algo:\n1. Look into notebook settings -> Accelerator -> GPU .... backend run notebook in GPU enviroment ....\n2. but .... you have to ... use GPU :) .... some of frameworks use it by default ... some ... you have to send model/data to CUDA",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1656943,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "01/19/2022 19:34:26",
      "content": "<p>based on the model you use,  look up some example first to copy with. why not GPU ?   </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1656945,
      "author_name": "remekkinas",
      "author_url": "",
      "post_date": "01/19/2022 19:38:01",
      "content": "<p>Background submission algo:</p>\n<ol>\n<li>Look into notebook settings -&gt; Accelerator -&gt; GPU …. backend run notebook in GPU enviroment ….</li>\n<li>but …. you have to … use GPU :) …. some of frameworks use it by default … some … you have to send model/data to CUDA</li>\n</ol>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1656919": "1. I have a lack in understanding if GPU is used during background score calculation after I made a submission.\n2. I also saw instructions that in order to use GPU, some modifications should be done in code and not only in settings, but I didn't get what actually should be done. On my local computer training and inference is running on GPU by definition and I use `with tf.device(\"/cpu\"):` if I want to redirect execution to CPU. What should be done in kaggle?\n\nPS. I just checked the time for my notebook on kaggle and it looks like inference takes about 3.5 seconds per image, which is a way more than I have on my local computer - less than 200 milli-seconds per frame for GPU inference and CPU post-processing.\nHow can it be improved?",
    "1656943": "based on the model you use,  look up some example first to copy with. why not GPU ?",
    "1656945": "Background submission algo:\n1. Look into notebook settings -> Accelerator -> GPU .... backend run notebook in GPU enviroment ....\n2. but .... you have to ... use GPU :) .... some of frameworks use it by default ... some ... you have to send model/data to CUDA"
  },
  "source": "meta"
}