Skip to content

Commit 5a0fd90

Browse files
thundergolfergvisor-bot
authored andcommitted
nvproxy: implement missing NV_MEMORY_MULTICAST_FABRIC, NV00FD_*
Adding ioctls to fix a simple multi-GPU Huggingface`accelerate` program that does not work on GCP H100s. --- ### System details * **instance type:** `a3-highgpu-8g` (GCP, us-east4-a) * **NVIDIA driver:** `Driver Version: 550.54.15 CUDA Version: 12.4` * **NVIDIA device:** 4 x NVIDIA H100 HBM3 * **uname -a:** `Linux gcp-h100-us-east4-a-0-bb25baf985414f8899dfdfcb82d6796d 5.15.0-208.159.3.el9uek.x86_64 #2 SMP Wed Jun 19 09:05:13 PDT 2024 x86_64 x86_64 x86_64 GNU/Linux` ``` runsc version release-20240513.0-173-gc526d251933a-dirty spec: 1.1.0-rc.1 ``` --- ## Reproduction steps 1. **Install gVisor** **2. Add GPU enabling gvisor options** In `/etc/docker/daemon.json`: ```json { "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] }, "runsc": { "path": "/home/modal/runsc", "runtimeArgs": ["--nvproxy", "--nvproxy-docker", "-debug-log=/tmp/runsc/", "-debug", "-strace"] } } } ``` **3. Run Dockerfile** ```Dockerfile # Dockerfile FROM winglian/axolotl@sha256:5c724f7accd8188b0f84ead93b7efbfa8f8661f40e133646bd6d946bc3423d6d RUN pip install fastapi==0.111.0 RUN pip install huggingface-hub~=0.23.0 pydantic==2.6.3 python-dateutil ENV HUGGINGFACE_HUB_CACHE="/pretrained" ENV TQDM_DISABLE="true" ENV AXOLOTL_NCCL_TIMEOUT="60" COPY <<EOF repro.py import os import subprocess from pathlib import Path print("[MOD-3226] hello from the repro!!!") from accelerate import Accelerator accelerator = Accelerator() with accelerator.main_process_first(): print(f"hello! {accelerator.process_index}") EOF ENTRYPOINT ["accelerate", "launch", "repro.py"] ``` ``` sudo docker run -it --runtime=$RUNTIME --gpus='"device=GPU-c453e5c7-a56d-70bf-78ce-61be6cb8e0db,GPU-4703196a-e3df-9e3f-bb8b-6fa91c8e9970,GPU-4a9c162c-9280-eaa8-215a-2c681e82a99f,GPU-1660d344-e18b-e48a-cced-38380e903c31"' ce4326479c8412b13bba27416e3e77093d4411279b432ca1b25050f17ef57a67 ``` ### Results **`runc`** ``` sudo docker run -it --gpus='"device=GPU-c453e5c7-a56d-70bf-78ce-61be6cb8e0db,GPU-4703196a-e3df-9e3f-bb8b-6fa91c8e9970,GPU-4a9c162c-9280-eaa8-215a-2c681e82a99f,GPU-1660d344-e18b-e48a-cced-38380e903c31"' ce4326479c8412b13bba27416e3e77093d4411279b432ca1b25050f17ef57a67 The following values were not passed to `accelerate launch` and had defaults used instead: `--num_processes` was set to a value of `4` More than one GPU was found, enabling multi-GPU training. If this was unintended please pass in `--num_processes=1`. `--num_machines` was set to a value of `1` `--mixed_precision` was set to a value of `'no'` `--dynamo_backend` was set to a value of `'no'` To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`. [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! hello! 0 hello! 1 hello! 2hello! 3 ``` **`runsc` (main)** <details> <summary>💥 Failure logs</summary> ``` sudo docker run -it --runtime=runsc --gpus='"device=GPU-c453e5c7-a56d-70bf-78ce-61be6cb8e0db,GPU-4703196a-e3df-9e3f-bb8b-6fa91c8e9970,GPU-4a9c162c-9280-eaa8-215a-2c681e82a99f,GPU-1660d344-e18b-e48a-cced-38380e903c31"' ce4326479c8412b13bba27416e3e77093d4411279b432ca1b25050f17ef57a67 The following values were not passed to `accelerate launch` and had defaults used instead: `--num_processes` was set to a value of `4` More than one GPU was found, enabling multi-GPU training. If this was unintended please pass in `--num_processes=1`. `--num_machines` was set to a value of `1` `--mixed_precision` was set to a value of `'no'` `--dynamo_backend` was set to a value of `'no'` To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`. [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! Detected kernel version 4.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. hello! 0 Traceback (most recent call last): File "/workspace/axolotl/repro.py", line 10, in <module> with accelerator.main_process_first(): File "/root/miniconda3/envs/py3.10/lib/python3.10/contextlib.py", line 142, in __exit__ next(self.gen) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/accelerator.py", line 884, in main_process_first with self.state.main_process_first(): File "/root/miniconda3/envs/py3.10/lib/python3.10/contextlib.py", line 142, in __exit__ next(self.gen) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/state.py", line 1056, in main_process_first with PartialState().main_process_first(): File "/root/miniconda3/envs/py3.10/lib/python3.10/contextlib.py", line 142, in __exit__ next(self.gen) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/state.py", line 502, in main_process_first yield from self._goes_first(self.is_main_process) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/state.py", line 390, in _goes_first self.wait_for_everyone() File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/state.py", line 379, in wait_for_everyone torch.distributed.barrier() File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/distributed/c10d_logger.py", line 47, in wrapper return func(*args, **kwargs) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/distributed/distributed_c10d.py", line 3696, in barrier work = default_pg.barrier(opts=opts) torch.distributed.DistBackendError: NCCL error in: ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1333, unhandled cuda error (run with NCCL_DEBUG=INFO for details), NCCL version 2.18.6 ncclUnhandledCudaError: Call to CUDA function failed. Last error: Cuda failure 'unknown error' [2024-07-11 19:52:01,530] torch.distributed.elastic.multiprocessing.api: [WARNING] Sending process 68 closing signal SIGTERM [2024-07-11 19:52:01,532] torch.distributed.elastic.multiprocessing.api: [WARNING] Sending process 69 closing signal SIGTERM [2024-07-11 19:52:01,533] torch.distributed.elastic.multiprocessing.api: [WARNING] Sending process 70 closing signal SIGTERM [2024-07-11 19:52:02,108] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: 1) local_rank: 0 (pid: 67) of binary: /root/miniconda3/envs/py3.10/bin/python Traceback (most recent call last): File "/root/miniconda3/envs/py3.10/bin/accelerate", line 8, in <module> sys.exit(main()) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 46, in main args.func(args) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/commands/launch.py", line 1073, in launch_command multi_gpu_launcher(args) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/accelerate/commands/launch.py", line 718, in multi_gpu_launcher distrib_run.run(args) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/distributed/run.py", line 797, in run elastic_launch( File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 134, in __call__ return launch_agent(self._config, self._entrypoint, list(args)) File "/root/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent raise ChildFailedError( torch.distributed.elastic.multiprocessing.errors.ChildFailedError: repro.py FAILED ------------------------------------------------------------ Failures: <NO_OTHER_FAILURES> ------------------------------------------------------------ Root Cause (first observed failure): [0]: time : 2024-07-11_19:52:01 host : d45a08528293 rank : 0 (local_rank: 0) exitcode : 1 (pid: 67) error_file: <N/A> traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html ``` --- </details> **`runsc` (this pull request)** <details> <summary>✅ Success logs</summary> ``` [modal@gcp-h100-us-east4-a-0-bb25baf985414f8899dfdfcb82d6796d ~]$ sudo docker run -it --runtime=runsc --gpus='"device=GPU-c453e5c7-a56d-70bf-78ce-61be6cb8e0db,GPU-4703196a-e3df-9e3f-bb8b-6fa91c8e9970,GPU-4a9c162c-9280-eaa8-215a-2c681e82a99f,GPU-1660d344-e18b-e48a-cced-38380e903c31"' ce4326479c8412b13bba27416e3e77093d4411279b432ca1b25050f17ef57a67 The following values were not passed to `accelerate launch` and had defaults used instead: `--num_processes` was set to a value of `4` More than one GPU was found, enabling multi-GPU training. If this was unintended please pass in `--num_processes=1`. `--num_machines` was set to a value of `1` `--mixed_precision` was set to a value of `'no'` `--dynamo_backend` was set to a value of `'no'` To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`. [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! [MOD-3226] hello from the repro!!! Detected kernel version 4.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher. hello! 0 hello! 1 hello! 3hello! 2 ``` </details> FUTURE_COPYBARA_INTEGRATE_REVIEW=#10649 from thundergolfer:master d3d19f1 PiperOrigin-RevId: 651754677
1 parent 0f9ec81 commit 5a0fd90

File tree

5 files changed

+124
-34
lines changed

5 files changed

+124
-34
lines changed

pkg/abi/nvgpu/classes.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const (
4242
NV01_EVENT_OS_EVENT = 0x00000079
4343
NV01_DEVICE_0 = 0x00000080
4444
NV_MEMORY_FABRIC = 0x000000f8
45+
NV_MEMORY_MULTICAST_FABRIC = 0x000000fd
4546
NV20_SUBDEVICE_0 = 0x00002080
4647
NV2081_BINAPI = 0x00002081
4748
NV50_P2P = 0x0000503b
@@ -333,6 +334,45 @@ type NV00F8_ALLOCATION_PARAMETERS struct {
333334
Map nv00f8Map
334335
}
335336

337+
// From src/common/sdk/nvidia/inc/class/cl00e0.h
338+
const (
339+
NV_MEM_EXPORT_UUID_LEN = 16
340+
)
341+
342+
// NV_EXPORT_MEM_PACKET is from
343+
// src/common/sdk/nvidia/inc/class/cl00e0.h
344+
//
345+
// +marshal
346+
type NV_EXPORT_MEM_PACKET struct {
347+
UUID [NV_MEM_EXPORT_UUID_LEN]uint8
348+
Opaque [16]uint8
349+
}
350+
351+
// NV00FD_ALLOCATION_PARAMETERS is the alloc param type for NV_MEMORY_MULTICAST_FABRIC
352+
// from src/common/sdk/nvidia/inc/class/cl00fd.h
353+
//
354+
// +marshal
355+
type NV00FD_ALLOCATION_PARAMETERS struct {
356+
Alignment uint64
357+
AllocSize uint64
358+
PageSize uint32
359+
AllocFlags uint32
360+
NumGPUs uint32
361+
_ uint32
362+
POsEvent P64
363+
}
364+
365+
// NV00FD_ALLOCATION_PARAMETERS_V545 is the updated version of
366+
// NV00FD_ALLOCATION_PARAMETERS since 545.23.06.
367+
//
368+
// +marshal
369+
type NV00FD_ALLOCATION_PARAMETERS_V545 struct {
370+
ExpPacket NV_EXPORT_MEM_PACKET
371+
Index uint16
372+
_ [6]byte
373+
NV00FD_ALLOCATION_PARAMETERS
374+
}
375+
336376
// NV_CONFIDENTIAL_COMPUTE_ALLOC_PARAMS is the alloc param type for
337377
// NV_CONFIDENTIAL_COMPUTE, from src/common/sdk/nvidia/inc/class/clcb33.h.
338378
//

pkg/abi/nvgpu/ctrl.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,21 @@ const (
236236
NV0080_CTRL_CMD_PERF_CUDA_LIMIT_SET_CONTROL = 0x801909
237237
)
238238

239+
// From src/common/sdk/nvidia/inc/ctrl/ctrl00fd.h:
240+
const (
241+
NV00FD_CTRL_CMD_GET_INFO = 0xfd0101
242+
NV00FD_CTRL_CMD_ATTACH_MEM = 0xfd0102
243+
NV00FD_CTRL_CMD_ATTACH_GPU = 0xfd0104
244+
NV00FD_CTRL_CMD_DETACH_MEM = 0xfd0105
245+
)
246+
247+
// +marshal
248+
type NV00FD_CTRL_ATTACH_GPU_PARAMS struct {
249+
HSubDevice Handle
250+
Flags uint32
251+
DevDescriptor uint64
252+
}
253+
239254
// From src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080bus.h:
240255
const (
241256
NV2080_CTRL_CMD_BUS_GET_PCI_INFO = 0x20801801

pkg/sentry/devices/nvproxy/frontend.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,18 @@ func ctrlHasFrontendFD[Params any, PtrParams hasFrontendFDPtr[Params]](fi *front
564564
return n, nil
565565
}
566566

567+
func ctrlMemoryMulticastFabricAttachGPU(fi *frontendIoctlState, ioctlParams *nvgpu.NVOS54Parameters) (uintptr, error) {
568+
var ctrlParams nvgpu.NV00FD_CTRL_ATTACH_GPU_PARAMS
569+
if ctrlParams.SizeBytes() != int(ioctlParams.ParamsSize) {
570+
return 0, linuxerr.EINVAL
571+
}
572+
if _, err := ctrlParams.CopyIn(fi.t, addrFromP64(ioctlParams.Params)); err != nil {
573+
return 0, err
574+
}
575+
576+
return ctrlMemoryMulticastFabricAttachGPUInvoke(fi, ioctlParams, &ctrlParams)
577+
}
578+
567579
func ctrlClientSystemGetBuildVersion(fi *frontendIoctlState, ioctlParams *nvgpu.NVOS54Parameters) (uintptr, error) {
568580
var ctrlParams nvgpu.NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS
569581
if ctrlParams.SizeBytes() != int(ioctlParams.ParamsSize) {

pkg/sentry/devices/nvproxy/frontend_unsafe.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ func rmControlInvoke[Params any](fi *frontendIoctlState, ioctlParams *nvgpu.NVOS
4747
return n, nil
4848
}
4949

50+
func ctrlMemoryMulticastFabricAttachGPUInvoke(fi *frontendIoctlState, ioctlParams *nvgpu.NVOS54Parameters, ctrlParams *nvgpu.NV00FD_CTRL_ATTACH_GPU_PARAMS) (uintptr, error) {
51+
origDevDescriptor := ctrlParams.DevDescriptor
52+
devDescriptor, _ := fi.t.FDTable().Get(int32(origDevDescriptor))
53+
if devDescriptor == nil {
54+
return 0, linuxerr.EINVAL
55+
}
56+
defer devDescriptor.DecRef(fi.ctx)
57+
devDesc, ok := devDescriptor.Impl().(*frontendFD)
58+
if !ok {
59+
return 0, linuxerr.EINVAL
60+
}
61+
ctrlParams.DevDescriptor = uint64(devDesc.hostFD)
62+
n, err := rmControlInvoke(fi, ioctlParams, ctrlParams)
63+
ctrlParams.DevDescriptor = origDevDescriptor
64+
return n, err
65+
}
66+
5067
func ctrlClientSystemGetBuildVersionInvoke(fi *frontendIoctlState, ioctlParams *nvgpu.NVOS54Parameters, ctrlParams *nvgpu.NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS, driverVersionBuf, versionBuf, titleBuf *byte) (uintptr, error) {
5168
// *Buf arguments don't need runtime.KeepAlive() since our caller
5269
// ctrlClientSystemGetBuildVersion() copies them out, keeping them alive

pkg/sentry/devices/nvproxy/version.go

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ func Init() {
225225
0x80028b: rmControlSimple, // unknown, paramsSize == 1
226226
nvgpu.NV0080_CTRL_CMD_GPU_GET_CLASSLIST_V2: rmControlSimple,
227227
nvgpu.NV0080_CTRL_CMD_HOST_GET_CAPS_V2: rmControlSimple,
228+
nvgpu.NV00FD_CTRL_CMD_GET_INFO: rmControlSimple,
229+
nvgpu.NV00FD_CTRL_CMD_ATTACH_MEM: rmControlSimple,
230+
nvgpu.NV00FD_CTRL_CMD_DETACH_MEM: rmControlSimple,
228231
nvgpu.NV2080_CTRL_CMD_BUS_GET_PCI_INFO: rmControlSimple,
229232
nvgpu.NV2080_CTRL_CMD_BUS_GET_PCI_BAR_INFO: rmControlSimple,
230233
nvgpu.NV2080_CTRL_CMD_BUS_GET_INFO_V2: rmControlSimple,
@@ -290,46 +293,48 @@ func Init() {
290293
nvgpu.NV0000_CTRL_CMD_OS_UNIX_GET_EXPORT_OBJECT_INFO: ctrlHasFrontendFD[nvgpu.NV0000_CTRL_OS_UNIX_GET_EXPORT_OBJECT_INFO_PARAMS],
291294
nvgpu.NV0041_CTRL_CMD_GET_SURFACE_INFO: ctrlClientGetSurfaceInfo,
292295
nvgpu.NV0080_CTRL_CMD_FIFO_GET_CHANNELLIST: ctrlDevFIFOGetChannelList,
296+
nvgpu.NV00FD_CTRL_CMD_ATTACH_GPU: ctrlMemoryMulticastFabricAttachGPU,
293297
nvgpu.NV0080_CTRL_CMD_GPU_GET_CLASSLIST: ctrlDevGpuGetClasslist,
294298
nvgpu.NV2080_CTRL_CMD_FIFO_DISABLE_CHANNELS: ctrlSubdevFIFODisableChannels,
295299
nvgpu.NV2080_CTRL_CMD_GR_GET_INFO: ctrlSubdevGRGetInfo,
296300
nvgpu.NV503C_CTRL_CMD_REGISTER_VA_SPACE: ctrlRegisterVASpace,
297301
},
298302
allocationClass: map[nvgpu.ClassID]allocationClassHandler{
299-
nvgpu.NV01_ROOT: rmAllocRootClient,
300-
nvgpu.NV01_ROOT_NON_PRIV: rmAllocRootClient,
301-
nvgpu.NV01_MEMORY_SYSTEM: rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS],
302-
nvgpu.NV01_MEMORY_LOCAL_USER: rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS],
303-
nvgpu.NV01_ROOT_CLIENT: rmAllocRootClient,
304-
nvgpu.NV01_EVENT_OS_EVENT: rmAllocEventOSEvent,
305-
nvgpu.NV2081_BINAPI: rmAllocSimple[nvgpu.NV2081_ALLOC_PARAMETERS],
306-
nvgpu.NV01_DEVICE_0: rmAllocSimple[nvgpu.NV0080_ALLOC_PARAMETERS],
307-
nvgpu.NV_MEMORY_FABRIC: rmAllocSimple[nvgpu.NV00F8_ALLOCATION_PARAMETERS],
308-
nvgpu.NV20_SUBDEVICE_0: rmAllocSimple[nvgpu.NV2080_ALLOC_PARAMETERS],
309-
nvgpu.NV50_MEMORY_VIRTUAL: rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS],
310-
nvgpu.NV50_P2P: rmAllocSimple[nvgpu.NV503B_ALLOC_PARAMETERS],
311-
nvgpu.NV50_THIRD_PARTY_P2P: rmAllocSimple[nvgpu.NV503C_ALLOC_PARAMETERS],
312-
nvgpu.GT200_DEBUGGER: rmAllocSMDebuggerSession,
313-
nvgpu.FERMI_CONTEXT_SHARE_A: rmAllocContextShare,
314-
nvgpu.FERMI_VASPACE_A: rmAllocSimple[nvgpu.NV_VASPACE_ALLOCATION_PARAMETERS],
315-
nvgpu.KEPLER_CHANNEL_GROUP_A: rmAllocChannelGroup,
316-
nvgpu.TURING_CHANNEL_GPFIFO_A: rmAllocChannel,
317-
nvgpu.AMPERE_CHANNEL_GPFIFO_A: rmAllocChannel,
318-
nvgpu.HOPPER_CHANNEL_GPFIFO_A: rmAllocChannel,
319-
nvgpu.TURING_DMA_COPY_A: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
320-
nvgpu.AMPERE_DMA_COPY_A: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
321-
nvgpu.AMPERE_DMA_COPY_B: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
322-
nvgpu.HOPPER_DMA_COPY_A: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
323-
nvgpu.TURING_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
324-
nvgpu.AMPERE_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
325-
nvgpu.AMPERE_COMPUTE_B: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
326-
nvgpu.ADA_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
327-
nvgpu.NV_CONFIDENTIAL_COMPUTE: rmAllocSimple[nvgpu.NV_CONFIDENTIAL_COMPUTE_ALLOC_PARAMS],
328-
nvgpu.HOPPER_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
329-
nvgpu.HOPPER_USERMODE_A: rmAllocSimple[nvgpu.NV_HOPPER_USERMODE_A_PARAMS],
330-
nvgpu.GF100_SUBDEVICE_MASTER: rmAllocNoParams,
331-
nvgpu.TURING_USERMODE_A: rmAllocNoParams,
332-
nvgpu.HOPPER_SEC2_WORK_LAUNCH_A: rmAllocNoParams,
303+
nvgpu.NV01_ROOT: rmAllocRootClient,
304+
nvgpu.NV01_ROOT_NON_PRIV: rmAllocRootClient,
305+
nvgpu.NV01_MEMORY_SYSTEM: rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS],
306+
nvgpu.NV01_MEMORY_LOCAL_USER: rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS],
307+
nvgpu.NV01_ROOT_CLIENT: rmAllocRootClient,
308+
nvgpu.NV01_EVENT_OS_EVENT: rmAllocEventOSEvent,
309+
nvgpu.NV2081_BINAPI: rmAllocSimple[nvgpu.NV2081_ALLOC_PARAMETERS],
310+
nvgpu.NV01_DEVICE_0: rmAllocSimple[nvgpu.NV0080_ALLOC_PARAMETERS],
311+
nvgpu.NV_MEMORY_FABRIC: rmAllocSimple[nvgpu.NV00F8_ALLOCATION_PARAMETERS],
312+
nvgpu.NV_MEMORY_MULTICAST_FABRIC: rmAllocSimple[nvgpu.NV00FD_ALLOCATION_PARAMETERS],
313+
nvgpu.NV20_SUBDEVICE_0: rmAllocSimple[nvgpu.NV2080_ALLOC_PARAMETERS],
314+
nvgpu.NV50_MEMORY_VIRTUAL: rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS],
315+
nvgpu.NV50_P2P: rmAllocSimple[nvgpu.NV503B_ALLOC_PARAMETERS],
316+
nvgpu.NV50_THIRD_PARTY_P2P: rmAllocSimple[nvgpu.NV503C_ALLOC_PARAMETERS],
317+
nvgpu.GT200_DEBUGGER: rmAllocSMDebuggerSession,
318+
nvgpu.FERMI_CONTEXT_SHARE_A: rmAllocContextShare,
319+
nvgpu.FERMI_VASPACE_A: rmAllocSimple[nvgpu.NV_VASPACE_ALLOCATION_PARAMETERS],
320+
nvgpu.KEPLER_CHANNEL_GROUP_A: rmAllocChannelGroup,
321+
nvgpu.TURING_CHANNEL_GPFIFO_A: rmAllocChannel,
322+
nvgpu.AMPERE_CHANNEL_GPFIFO_A: rmAllocChannel,
323+
nvgpu.HOPPER_CHANNEL_GPFIFO_A: rmAllocChannel,
324+
nvgpu.TURING_DMA_COPY_A: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
325+
nvgpu.AMPERE_DMA_COPY_A: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
326+
nvgpu.AMPERE_DMA_COPY_B: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
327+
nvgpu.HOPPER_DMA_COPY_A: rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS],
328+
nvgpu.TURING_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
329+
nvgpu.AMPERE_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
330+
nvgpu.AMPERE_COMPUTE_B: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
331+
nvgpu.ADA_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
332+
nvgpu.NV_CONFIDENTIAL_COMPUTE: rmAllocSimple[nvgpu.NV_CONFIDENTIAL_COMPUTE_ALLOC_PARAMS],
333+
nvgpu.HOPPER_COMPUTE_A: rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS],
334+
nvgpu.HOPPER_USERMODE_A: rmAllocSimple[nvgpu.NV_HOPPER_USERMODE_A_PARAMS],
335+
nvgpu.GF100_SUBDEVICE_MASTER: rmAllocNoParams,
336+
nvgpu.TURING_USERMODE_A: rmAllocNoParams,
337+
nvgpu.HOPPER_SEC2_WORK_LAUNCH_A: rmAllocNoParams,
333338
},
334339
}
335340
}
@@ -351,6 +356,7 @@ func Init() {
351356
v545_23_06 := func() *driverABI {
352357
abi := v535_113_01()
353358
abi.controlCmd[nvgpu.NV0000_CTRL_CMD_OS_UNIX_GET_EXPORT_OBJECT_INFO] = ctrlHasFrontendFD[nvgpu.NV0000_CTRL_OS_UNIX_GET_EXPORT_OBJECT_INFO_PARAMS_V545]
359+
abi.allocationClass[nvgpu.NV_MEMORY_MULTICAST_FABRIC] = rmAllocSimple[nvgpu.NV00FD_ALLOCATION_PARAMETERS_V545]
354360
abi.allocationClass[nvgpu.NV01_MEMORY_SYSTEM] = rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS_V545]
355361
abi.allocationClass[nvgpu.NV01_MEMORY_LOCAL_USER] = rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS_V545]
356362
abi.allocationClass[nvgpu.NV50_MEMORY_VIRTUAL] = rmAllocSimple[nvgpu.NV_MEMORY_ALLOCATION_PARAMS_V545]

0 commit comments

Comments
 (0)