torch.cuda.nvtx.range¶ torch.cuda.nvtx.range(msg, *args, **kwargs)[来源][来源]¶ 上下文管理器/装饰器,在其作用域开始时推送 NVTX 范围,并在结束时弹出。如果给出了额外的参数,它们将作为参数传递给 msg.format()。 参数 msg (str) – 与范围关联的消息