Skip to content

Commit caa2a2f

Browse files
deep1712DEVAID-MSFTnmalkapuram
authored
Adding DCGMI linux-arm64 support (#377)
* Adding DCGMI arm64 support * Adding DCGMI installation for linux-arm64 * Adding ppc64le link * Adding username --------- Co-authored-by: Deepanshu Vaid <devaid@microsoft.com> Co-authored-by: nmalkapuram <nmalkapuram@microsoft.com>
1 parent 8d293d7 commit caa2a2f

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

src/VirtualClient/VirtualClient.Actions/DCGMI/DCGMIExecutor.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ public string ListOfFieldIDsDmon
122122
}
123123
}
124124

125+
/// <summary>
126+
/// The version of CUDA to be installed in Linux Systems
127+
/// </summary>
128+
public string LinuxCudaVersion
129+
{
130+
get
131+
{
132+
return this.Parameters.GetValue<string>(nameof(DCGMIExecutor.LinuxCudaVersion), "11.6");
133+
}
134+
}
135+
125136
/// <summary>
126137
/// Initializes enviroment to run DCGMI.
127138
/// </summary>
@@ -361,7 +372,7 @@ private async Task ExecuteDCGMIProfTesterSubsystemAsync(EventContext telemetryCo
361372
using (BackgroundOperations profiling = BackgroundOperations.BeginProfiling(this, cancellationToken))
362373
{
363374
List<Task<string>> tasksList = new List<Task<string>>();
364-
string dcgmproftestercommand = $"/usr/bin/dcgmproftester11 --no-dcgm-validation -t {this.FieldIDProftester} -d 10";
375+
string dcgmproftestercommand = $"/usr/bin/dcgmproftester{(int)Convert.ToDouble(this.LinuxCudaVersion)} --no-dcgm-validation -t {this.FieldIDProftester} -d 10";
365376
string dmoncommand = $"dcgmi dmon -e {this.ListOfFieldIDsDmon} -c 15";
366377
DateTime startTime = DateTime.UtcNow;
367378

src/VirtualClient/VirtualClient.Dependencies/DCGMIInstallation.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,19 @@ private async Task InstallDCGMIUbuntuOrDebianAsync(EventContext telemetryContext
107107
List<string> commands = new List<string>();
108108

109109
string delKeyCommand = "apt-key del 7fa2af80";
110-
string metaPackageDownloadCommand;
110+
string metaPackageDownloadCommand = string.Empty;
111111
if (this.PlatformSpecifics.CpuArchitecture == Architecture.X64)
112112
{
113113
metaPackageDownloadCommand = $@"bash -c ""wget https://developer.download.nvidia.com/compute/cuda/repos/$(echo $(. /etc/os-release; echo $ID$VERSION_ID) | sed -e 's/\.//g')/x86_64/cuda-keyring_1.0-1_all.deb""";
114114
}
115-
else
115+
else if (this.PlatformSpecifics.CpuArchitecture == Architecture.Arm64)
116116
{
117117
metaPackageDownloadCommand = $@"bash -c ""wget https://developer.download.nvidia.com/compute/cuda/repos/$(echo $(. /etc/os-release; echo $ID$VERSION_ID) | sed -e 's/\.//g')/sbsa/cuda-keyring_1.0-1_all.deb""";
118118
}
119+
else if (this.PlatformSpecifics.CpuArchitecture == Architecture.Ppc64le)
120+
{
121+
metaPackageDownloadCommand = $@"bash -c ""wget https://developer.download.nvidia.com/compute/cuda/repos/$(echo $(. /etc/os-release; echo $ID$VERSION_ID) | sed -e 's/\.//g')/ppc64le/cuda-keyring_1.0-1_all.deb""";
122+
}
119123

120124
string cudaGPGKeyInstallCommand = @"dpkg -i cuda-keyring_1.0-1_all.deb";
121125
string updateCommand = @"apt-get update";

src/VirtualClient/VirtualClient.Main/profiles/QUAL-GPU-DCGMI.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
},
88
"Parameters": {
99
"Level": "4",
10-
"Username": "null"
10+
"Username": "",
11+
"LinuxCudaVersion": "12.4"
1112
},
1213
"Actions": [
1314
{
@@ -59,6 +60,7 @@
5960
"Scenario": "CUDAIntegrationDiagnostics",
6061
"Subsystem": "CUDATestGenerator",
6162
"FieldIDProftester": "1004",
63+
"LinuxCudaVersion": "$.Parameters.LinuxCudaVersion",
6264
"ListOfFieldIDsDmon": "1004,1005,1001"
6365
}
6466
}
@@ -68,7 +70,7 @@
6870
"Type": "NvidiaCudaInstallation",
6971
"Parameters": {
7072
"Scenario": "InstallNvidiaCuda",
71-
"LinuxCudaVersion": "11.6",
73+
"LinuxCudaVersion": "$.Parameters.LinuxCudaVersion",
7274
"LinuxDriverVersion": "510",
7375
"Username": "$.Parameters.Username",
7476
"LinuxLocalRunFile": "https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run"

0 commit comments

Comments
 (0)