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