@@ -23,7 +23,7 @@ func main() {
2323// GenerateGPUInfoConfig generates the configuration used by the ECS agent
2424func generateGPUInfoConfig () error {
2525 if ret := nvml .Init (); ret != nvml .SUCCESS {
26- return fmt .Errorf ("Failed to initialize NVML, got ret %v" , ret )
26+ return fmt .Errorf ("failed to initialize NVML, got ret %v" , ret )
2727 }
2828 defer func () {
2929 ret := nvml .Shutdown ()
@@ -34,7 +34,7 @@ func generateGPUInfoConfig() error {
3434
3535 version , ret := nvml .SystemGetDriverVersion ()
3636 if ret != nvml .SUCCESS {
37- return fmt .Errorf ("Failed to get version, got ret %v" , ret )
37+ return fmt .Errorf ("failed to get version, got ret %v" , ret )
3838 }
3939 gpuIDs , err := getGPUDeviceIDs ()
4040 if err != nil {
@@ -48,7 +48,7 @@ func generateGPUInfoConfig() error {
4848func getGPUDeviceIDs () ([]string , error ) {
4949 count , ret := nvml .DeviceGetCount ()
5050 if ret != nvml .SUCCESS {
51- return nil , fmt .Errorf ("Failed to get device count, got ret %v" , ret )
51+ return nil , fmt .Errorf ("failed to get device count, got ret %v" , ret )
5252 }
5353 var (
5454 gpuIDs []string
@@ -63,7 +63,7 @@ func getGPUDeviceIDs() ([]string, error) {
6363 gpuIDs = append (gpuIDs , uuid )
6464 }
6565 if len (errors ) > 0 {
66- return nil , fmt .Errorf ("Found errors while initializing devices: %s" , errors )
66+ return nil , fmt .Errorf ("found errors while initializing devices: %s" , errors )
6767 }
6868 return gpuIDs , nil
6969}
@@ -92,11 +92,11 @@ func writeGPUInfo(version string, gpuIDs []string) error {
9292func getDeviceUUID (idx int ) (string , error ) {
9393 d , ret := nvml .DeviceGetHandleByIndex (idx )
9494 if ret != nvml .SUCCESS {
95- return "" , fmt .Errorf ("Failed to get device at index %d, got ret %v" , idx , ret )
95+ return "" , fmt .Errorf ("failed to get device at index %d, got ret %v" , idx , ret )
9696 }
9797 uuid , ret := d .GetUUID ()
9898 if ret != nvml .SUCCESS {
99- return "" , fmt .Errorf ("Failed to get UUID for device at index %d, got ret %v" , idx , ret )
99+ return "" , fmt .Errorf ("failed to get UUID for device at index %d, got ret %v" , idx , ret )
100100 }
101101
102102 return uuid , nil
0 commit comments