Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/dcgm/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ func GetLatestValuesForFields(gpu uint, fields []Short) ([]FieldValue_v1, error)
// parentId is the ID of the parent entity.
// fields is a slice of field IDs to retrieve.
// Returns a slice of field values and any error encountered.
func LinkGetLatestValues(index, parentId uint, fields []Short) ([]FieldValue_v1, error) {
slice := []byte{uint8(FE_SWITCH), uint8(index), uint8(parentId), 0}
func LinkGetLatestValues(index uint, parentType Field_Entity_Group, parentId uint, fields []Short) ([]FieldValue_v1, error) {
slice := []byte{uint8(parentType), uint8(index), uint8(parentId), 0}
entityId := binary.LittleEndian.Uint32(slice)
return EntityGetLatestValues(FE_LINK, uint(entityId), fields)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/dcgm/gpu_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ func AddToGroup(groupID GroupHandle, gpuID uint) (err error) {
}

// AddLinkEntityToGroup adds a link entity to the group
func AddLinkEntityToGroup(groupID GroupHandle, index, parentID uint) (err error) {
func AddLinkEntityToGroup(groupID GroupHandle, index uint, entityGroupID Field_Entity_Group, parentID uint) (err error) {
/* Only supported on little-endian systems currently */
slice := make([]byte, 4)
slice[0] = uint8(FE_SWITCH)
slice[0] = uint8(entityGroupID)
binary.LittleEndian.PutUint16(slice[1:3], uint16(index))
slice[3] = uint8(parentID)

Expand Down