Skip to content

Commit

Permalink
feat: Add accelerator type for Slurm [FOUNDENG-483] (determined-ai#711)
Browse files Browse the repository at this point in the history
If the Slrum hpcPartitionDetails contains accelerator type set it for the resource pool.
  • Loading branch information
jerryharrow authored and dzhu committed Apr 25, 2023
1 parent 2a102e1 commit 6f0cefd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ type hpcPartitionDetails struct {
TotalGpuSlots int `json:"totalGpuSlots"`
TotalAvailableCPUSlots int `json:"totalAvailableCpuSlots"`
TotalCPUSlots int `json:"totalCpuSlots"`
Accelerator string `json:"accelerator"`
}

// hpcNodeDetails holds HPC Slurm node details.
Expand Down Expand Up @@ -1379,6 +1380,7 @@ func (m *dispatcherResourceManager) summarizeResourcePool(
ImageId: "",
InstanceType: wlmName,
Details: &resourcepoolv1.ResourcePoolDetail{},
Accelerator: v.Accelerator,
}
poolNameMap[pool.Name] = &pool
result = append(result, &pool)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ func Test_summarizeResourcePool(t *testing.T) {
TotalAvailableGpuSlots: 2,
TotalNodes: 10,
TotalGpuSlots: 5,
Accelerator: "tesla",
}
p2 := hpcPartitionDetails{
TotalAvailableNodes: 0,
Expand Down Expand Up @@ -339,6 +340,7 @@ func Test_summarizeResourcePool(t *testing.T) {
SlotsAvailable: 5,
SlotsUsed: 3,
NumAgents: 10,
Accelerator: "tesla",
},
{
Name: "partition 2",
Expand Down

0 comments on commit 6f0cefd

Please sign in to comment.