Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • K ktransformers
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenDAS
  • ktransformers
  • Merge requests
  • !1

You need to sign in or sign up before continuing.
Open
Created Aug 24, 2025 by ox696c@ox696c
  • Report abuse
Report abuse

Update utils.py

  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

utils.py中缺少get_device_name,导致调用出错。

def get_device_name(device:torch.device = None):
    if torch.cuda.is_available():
        if device is None:
            num_gpus = torch.cuda.device_count()
            gpu_name = []
            for gpu_id in range(num_gpus):
                gpu_name.append(torch.cuda.get_device_name(gpu_id))
            return gpu_name
        else:
            return torch.cuda.get_device_name(device)
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: ox696c-v0.3.1-fastpt-patch-21728