Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
songlinfeng
container-toolkit
Commits
6f5ea3a6
Commit
6f5ea3a6
authored
Nov 27, 2025
by
songlinfeng
Browse files
support hydcu/hycu
parent
5f7b0309
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
internal/hydcu/hydcu.go
internal/hydcu/hydcu.go
+1
-4
No files found.
internal/hydcu/hydcu.go
View file @
6f5ea3a6
...
...
@@ -49,9 +49,6 @@ func (fs *DefaultFS) GetDeviceStat(dev string, format string) (string, error) {
func
GetHYDCUs
()
([]
DeviceInfo
,
error
)
{
return
GetHyDCUsWithFS
(
defaultFS
)
}
func
GetHyDCUsWithFS
(
fs
FileSystem
)
([]
DeviceInfo
,
error
)
{
if
_
,
err
:=
fs
.
Stat
(
"/sys/module/hydcu/drivers/"
);
err
!=
nil
{
return
nil
,
err
}
renderDevIds
:=
GetDevIdsFromTopology
(
fs
)
...
...
@@ -59,7 +56,7 @@ func GetHyDCUsWithFS(fs FileSystem) ([]DeviceInfo, error) {
uniqueIdDevices
:=
make
(
map
[
string
][]
DeviceInfo
)
var
uniqueIds
[]
string
// To maintain order
pciDevs
,
err
:=
fs
.
Glob
(
"/sys/module/hy
d
cu/drivers/pci:hy
d
cu/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]:*"
)
pciDevs
,
err
:=
fs
.
Glob
(
"/sys/module/hy
*
cu/drivers/pci:hy
*
cu/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]:*"
)
if
err
!=
nil
{
fmt
.
Println
(
"Failed to find hydcu driver directories: %v"
,
err
)
return
nil
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment