{
  "id": 491885,
  "title": "CPU Utilization maximum and GPU utilization is 0%",
  "url": "/competitions/birdclef-2024/discussion/491885",
  "author_name": "",
  "post_date": "2024-04-07T17:50:18.390816Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F15856017%2Ffa97428658be92c48d90e74258a1bc41%2FScreenshot%202024-04-07%20231631.png?generation=1712512095099474&amp;alt=media\"></p>\n<p>I was running my notebook.</p>\n<p>def dummy(audio_file) :<br>\n    info = torchaudio.info(\"/kaggle/input/birdclef-2024/train_audio/\" + audio_file)<br>\n    duration_sec = info.num_frames / info.sample_rate<br>\n    return duration_sec</p>\n<p>df['X'].apply(dummy)</p>\n<p>I want to know the duration the audio files. But there is no GPU utilization. How can I resolve it. Please help!</p>",
  "messages": [
    {
      "id": "2740270",
      "postDate": "04/07/2024 17:50:18",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F15856017%2Ffa97428658be92c48d90e74258a1bc41%2FScreenshot%202024-04-07%20231631.png?generation=1712512095099474&amp;alt=media\"></p>\n<p>I was running my notebook.</p>\n<p>def dummy(audio_file) :<br>\n    info = torchaudio.info(\"/kaggle/input/birdclef-2024/train_audio/\" + audio_file)<br>\n    duration_sec = info.num_frames / info.sample_rate<br>\n    return duration_sec</p>\n<p>df['X'].apply(dummy)</p>\n<p>I want to know the duration the audio files. But there is no GPU utilization. How can I resolve it. Please help!</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F15856017%2Ffa97428658be92c48d90e74258a1bc41%2FScreenshot%202024-04-07%20231631.png?generation=1712512095099474&alt=media)\n\nI was running my notebook.\n\ndef dummy(audio_file) :\n    info = torchaudio.info(\"/kaggle/input/birdclef-2024/train_audio/\" + audio_file)\n    duration_sec = info.num_frames / info.sample_rate\n    return duration_sec\n\ndf['X'].apply(dummy)\n\nI want to know the duration the audio files. But there is no GPU utilization. How can I resolve it. Please help!",
      "votes": null
    },
    {
      "id": "2740348",
      "postDate": "04/07/2024 18:25:28",
      "content": "<p>If you are using torch, you probably need to do:</p>\n<pre><code>tensor_variable_name.to()\n</code></pre>",
      "rawMarkdown": "If you are using torch, you probably need to do:\n```python\ntensor_variable_name.to('cuda')\n```",
      "votes": null
    },
    {
      "id": "2741449",
      "postDate": "04/08/2024 11:02:05",
      "content": "<p>Another syntax would be <code>tensor_variable_name.cuda()</code></p>",
      "rawMarkdown": "Another syntax would be `tensor_variable_name.cuda()`",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2740348,
      "author_name": "alistairking",
      "author_url": "",
      "post_date": "04/07/2024 18:25:28",
      "content": "<p>If you are using torch, you probably need to do:</p>\n<pre><code>tensor_variable_name.to()\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 2741449,
          "author_name": "markwijkhuizen",
          "author_url": "",
          "post_date": "04/08/2024 11:02:05",
          "content": "<p>Another syntax would be <code>tensor_variable_name.cuda()</code></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2740270": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F15856017%2Ffa97428658be92c48d90e74258a1bc41%2FScreenshot%202024-04-07%20231631.png?generation=1712512095099474&alt=media)\n\nI was running my notebook.\n\ndef dummy(audio_file) :\n    info = torchaudio.info(\"/kaggle/input/birdclef-2024/train_audio/\" + audio_file)\n    duration_sec = info.num_frames / info.sample_rate\n    return duration_sec\n\ndf['X'].apply(dummy)\n\nI want to know the duration the audio files. But there is no GPU utilization. How can I resolve it. Please help!",
    "2740348": "If you are using torch, you probably need to do:\n```python\ntensor_variable_name.to('cuda')\n```",
    "2741449": "Another syntax would be `tensor_variable_name.cuda()`"
  },
  "source": "meta"
}