Add support for A10G Nvidia GPUs.

We were only missing `AMPERE_COMPUTE_B` allocation class.
Verified on an AWS g5.xlarge instance that runsc can at least run basic
vectoradd cuda application.

```
$ docker run --runtime=runsc --rm --gpus all --runtime=runsc nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda11.7.1-ubi8
[Vector addition of 50000 elements]
Copy input data from the host memory to the CUDA device
CUDA kernel launch with 196 blocks of 256 threads
Copy output data from the CUDA device to the host memory
Test PASSED
Done
```

Fixes #9151

PiperOrigin-RevId: 547560783
This commit is contained in:
Ayush Ranjan
2023-07-12 11:58:49 -07:00
committed by gVisor bot
parent f9219588c6
commit d0e7a2240e
2 changed files with 3 additions and 4 deletions
+1
View File
@@ -39,6 +39,7 @@ const (
AMPERE_DMA_COPY_A = 0x0000c6b5
AMPERE_COMPUTE_A = 0x0000c6c0
AMPERE_DMA_COPY_B = 0x0000c7b5
AMPERE_COMPUTE_B = 0x0000c7c0
HOPPER_DMA_COPY_A = 0x0000c8b5
ADA_COMPUTE_A = 0x0000c9c0
HOPPER_COMPUTE_A = 0x0000cbc0
+2 -4
View File
@@ -773,13 +773,11 @@ func rmAlloc(fi *frontendIoctlState) (uintptr, error) {
return rmAllocSimple[nvgpu.NV_CHANNEL_ALLOC_PARAMS](fi, &ioctlParams, isNVOS64)
case nvgpu.TURING_DMA_COPY_A, nvgpu.AMPERE_DMA_COPY_A, nvgpu.AMPERE_DMA_COPY_B, nvgpu.HOPPER_DMA_COPY_A:
return rmAllocSimple[nvgpu.NVB0B5_ALLOCATION_PARAMETERS](fi, &ioctlParams, isNVOS64)
case nvgpu.TURING_COMPUTE_A, nvgpu.AMPERE_COMPUTE_A, nvgpu.ADA_COMPUTE_A, nvgpu.HOPPER_COMPUTE_A:
case nvgpu.TURING_COMPUTE_A, nvgpu.AMPERE_COMPUTE_A, nvgpu.AMPERE_COMPUTE_B, nvgpu.ADA_COMPUTE_A, nvgpu.HOPPER_COMPUTE_A:
return rmAllocSimple[nvgpu.NV_GR_ALLOCATION_PARAMETERS](fi, &ioctlParams, isNVOS64)
case nvgpu.HOPPER_USERMODE_A:
return rmAllocSimple[nvgpu.NV_HOPPER_USERMODE_A_PARAMS](fi, &ioctlParams, isNVOS64)
case
nvgpu.GF100_SUBDEVICE_MASTER,
nvgpu.TURING_USERMODE_A:
case nvgpu.GF100_SUBDEVICE_MASTER, nvgpu.TURING_USERMODE_A:
return rmAllocNoParams(fi, &ioctlParams, isNVOS64)
default:
fi.ctx.Warningf("nvproxy: unknown allocation class %#08x", ioctlParams.HClass)