相关文章推荐
发怒的小蝌蚪  ·  C# WPF Treeview ...·  2 年前    · 
失眠的可乐  ·  WPF ...·  3 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm trying to measure the available space on each of my GPUs using torch.cuda module. However it is returning me the following error.

module 'torch.cuda' has no attribute 'memory_summary'

My code is below

if torch.cuda.is_available():
    for i in range(torch.cuda.device_count()):
        print(torch.cuda.get_device_name(i))
        a = torch.cuda.memory_summary(torch.device('cuda:{}'.format(i)))
        print(a)

Similarly memory_stats, mem_get_info and memory_reserved all are failing.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.