36 Commits
Author SHA1 Message Date
Zach KoopmansandgVisor bot 4ce00d28f6 Fix broken cuda tests
PiperOrigin-RevId: 734342887
2025-03-06 17:11:19 -08:00
zkoopmans 725669a152 Update cuda-tests for ARM workloads
Add image for ARM workloads for cuda-tests and mark tests that work on ARM.

Most tests don't work due to cross-compiling between sbma and aarch64.
However, a few do. Add an image to support them.
2025-02-27 21:55:38 +00:00
Ayush RanjanandgVisor bot 8c386259e0 Add /usr/local/nvidia/bin to PATH in ffmpeg image.
This image is being used for some GPU tests.

Also clean up /bin/nvidia/bin from PATH from all GPU images. It's not used.

PiperOrigin-RevId: 720649135
2025-01-28 11:35:48 -08:00
Etienne PerotandgVisor bot 5e6589e0b7 Update CUDA test compatibility to keep up with added gVisor support.
These CUDA tests were initially broken in gVisor but now appear to pass.

The test now also verifies that all capabilities are enabled when running.

PiperOrigin-RevId: 713094806
2025-01-07 17:28:00 -08:00
Etienne PerotandgVisor bot 3f058a8436 Harmonize ollama Docker image version.
The benchmark image was updated to 0.5.1, so this updates the other images
to the same version.

PiperOrigin-RevId: 706801311
2024-12-16 12:45:11 -08:00
Etienne PerotandgVisor bot 232c17cbb6 ollama benchmark: Add embedding benchmark, refresh set of models.
This refreshes the set of models built into the image to a more diverse
set of models while keeping the same categories covered.

It also adds support for embedding generation and benchmark metrics for
embedding-type models.

The image is also (slightly) smaller which helps make benchmarks not take
forever.

PiperOrigin-RevId: 706594537
2024-12-15 23:53:52 -08:00
Etienne PerotandgVisor bot 8516598640 Re-add PyTorch benchmarks into PyTorch image. Update CUDA version.
The PyTorch benchmarks were removed in
https://github.com/google/gvisor/commit/9304ed401fd9604bc36c0436a1132a8b4e3f0851#diff-fd8d6db82d75e1038ed6136c9930c17d6985ff5d22f2ed9e5e8910661de14228
but the Kubernetes PyTorch Kubernetes benchmarks actually depended on them.

PiperOrigin-RevId: 706569220
2024-12-15 21:36:27 -08:00
Jamie LiuandgVisor bot 78b9e4e0ae Temporarily remove test added by cl/672721411.
PiperOrigin-RevId: 700746834
2024-11-27 10:46:54 -08:00
Etienne PerotandgVisor bot b9252dcdc5 Add message at the end of smoke tests to indicate successful completion.
PiperOrigin-RevId: 695467154
2024-11-11 13:45:18 -08:00
Jamie LiuandgVisor bot 7c2bcddc13 Check for CUDA kernel launch errors in GPU smoke test.
PiperOrigin-RevId: 694699470
2024-11-08 17:34:13 -08:00
Jamie LiuandgVisor bot 4b430fcc20 Downgrade GPU smoke test to CUDA 12.2.2.
Per https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#id5,
CUDA 12.3.0 requires driver `>=545.23.06`, while CUDA 12.2.2 requires driver
`>=535.104.05`. Per nvproxy/version.go, 535.104.05 is currently the oldest
driver version we support.

PiperOrigin-RevId: 694652445
2024-11-08 15:00:50 -08:00
Etienne PerotandgVisor bot e13cf36ad7 Update all GPU tests to use the ioctl sniffer.
Fixes issue #10885.

PiperOrigin-RevId: 688728104
2024-10-22 16:21:47 -07:00
Jamie LiuandgVisor bot 1f4299ee3f nvproxy: implement frontendFDMemmapFile.MapInternal()
New test, before this CL:

```
Testing read/write syscalls on cudaMallocHost memory
cuda_malloc: write: Bad address
```

After this CL:

```
Testing read/write syscalls on cudaMallocHost memory
Testing cudaMallocManaged(flags=cudaMemAttachGlobal)
Testing cudaMallocManaged(flags=cudaMemAttachGlobal) with prefetching
Testing cudaMallocManaged(flags=cudaMemAttachHost)
Testing cudaMallocManaged(flags=cudaMemAttachHost) with prefetching
Testing read/write syscalls on cudaMallocManaged memory
All tests passed
```

Fixes #10879

PiperOrigin-RevId: 672721411
2024-09-09 16:58:47 -07:00
Anthony CuiandgVisor bot ab513ff9bb Add NCCL tests as a regression test.
PiperOrigin-RevId: 651541375
2024-07-11 14:48:31 -07:00
Otto Bittner 2cf6705467 add vllm benchmark
The benchmark loads a small model
to allow running on many platforms
and to keep execution time low for
experimentation. It will make sense
to add a version to this test that
loads a larger model (e.g. llama3-8b).
2024-07-09 09:43:26 +02:00
Anthony CuiandgVisor bot 18c7562286 Add simple functionality tests for ioctl_sniffer.
This also adds two new flags, --enforce_compatibility and --verbose, and
fixes an issue where legacy control ioctls were being flagged as unsupported.

PiperOrigin-RevId: 645193498
2024-06-20 16:41:27 -07:00
Jamie LiuandgVisor bot 8ed5e07639 nvproxy: allow sentry MMIO on nvidia-uvm mappings via buffered reads/writes
New test, before this change:

```
Testing cudaMallocManaged(flags=cudaMemAttachGlobal)
Testing cudaMallocManaged(flags=cudaMemAttachGlobal) with prefetching
Testing cudaMallocManaged(flags=cudaMemAttachHost)
Testing cudaMallocManaged(flags=cudaMemAttachHost) with prefetching
Testing read/write syscalls on cudaMallocManaged memory
cuda_malloc_managed: write: Bad address
```

After this change:

```
Testing cudaMallocManaged(flags=cudaMemAttachGlobal)
Testing cudaMallocManaged(flags=cudaMemAttachGlobal) with prefetching
Testing cudaMallocManaged(flags=cudaMemAttachHost)
Testing cudaMallocManaged(flags=cudaMemAttachHost) with prefetching
Testing read/write syscalls on cudaMallocManaged memory
All tests passed
```

Fixes #10331

PiperOrigin-RevId: 629859064
2024-05-01 15:40:59 -07:00
Etienne PerotandgVisor bot 4810afc36c GPU support: Add NVIDIA CUDA sample tests.
This is a set of CUDA tests defined by NVIDIA in this repository:
https://github.com/NVIDIA/cuda-samples

This change introduces a large new test (`cuda_test`) which runs each CUDA
sample test in a container.

There are many subtleties involved due to how the CUDA samples repository
isn't always meant to be run as a test, some of it involves graphical
applications, and a lot of them require this or that CUDA feature which not
all NVIDIA GPUs support, some require multiple GPUs to be on the machine, etc.
Therefore, the test maps each test to their `Compatibility` data which
determines whether or not a sample test is expected to fail when run in a
certain environment. The overall test also has a
`--cuda_verify_compatibility` flag to verify the veracity of this mapping,
by running expected-to-be-broken tests and verifying that their failure
matches how this expected failure typically manifests.

Because there are a lot of CUDA sample tests (213 as of the CUDA 12.3 release
of the cuda-samples repo), and they don't all require the whole GPU to
themselves, and spawning a GPU-using container is expensive (~seconds),
the test uses a pool of reusable containers in which it `exec`s tests (at
most one per container at any given time, but in parallel across containers).
If any test unexpectedly fails, we drain the entire pool of containers and
only run this one test without anything else running on other containers.
This de-flakes tests, especially those that fail because they require more
resources than the GPU has when other tests are using it at the same time.
However, this removes parallelism and therefore increases test time
significantly.

Despite these optimizations, the test is very long and has the maximum deadline
of 1 hour. Because it may get close to the timeout (especially when
`--cuda_verify_compatibility` is on, because that needs to run all the tests
even if they are known to fail, and the ones that do fail can hang for a
while rather than crash), the test also has more logging and debugging than
the typical test, as enabled with the `--cuda_log_successful_tests` and
`--cuda_test_debug` flag. It periodically logs the status of each container
and the pool's utilization ratio. This is useful when debugging the test to
see which pooled container is doing what, and/or to `docker exec` into
containers while they are running a certain test.
The test also does its own timekeeping, which is useful so that it can print
a more helpful failure message that distinguishes between tests failing due
to actual failure reasons vs those that are failing purely because the test
timed out.

To run the test manually (from a VM with the repo checked out):

```
$ docker build -t gvisor.dev/images/gpu/cuda-tests images/gpu/cuda-tests -f images/gpu/cuda-tests/Dockerfile.x86_64 && mkdir -p bin && make copy TARGETS=runsc DESTINATION=bin/ && ./bin/runsc install -- --nvproxy=true --debug=true --debug-log=/tmp/runsc/ && systemctl reload docker && make test TEST_OPTIONS='--test_output=streamed --verbose_failures=true' TARGETS=//test/gpu:cuda_test OPTIONS='--test_env=RUNTIME=runsc --test_arg=--cuda_test_debug=true --test_arg=cuda_verify_compatibility=true --test_arg=--cuda_log_successful_tests=true'
```

PiperOrigin-RevId: 626528982
2024-04-19 19:13:42 -07:00
Etienne PerotandgVisor bot ce673f29ce Fix and re-enable imagegen_test.go (1/2: Fix.)
PIL requires a string format name, whereas `Format.PNG` is an "enum string"
which is not quite the same type.

I had not noticed this problem because I had manually tested the test on a VM
where the cached Stable Diffusion XL Docker image was from before this change.

Tested on a fresh VM with a freshly-built Docker image now.

This is split in two changes because the image needs to be rebuilt.
The first change updates the image, and the second change re-enables the test.

PiperOrigin-RevId: 618048266
2024-03-21 20:49:50 -07:00
Etienne PerotandgVisor bot 687c542721 Automated rollback of changelist 614026488
PiperOrigin-RevId: 617336302
2024-03-19 16:59:25 -07:00
Etienne PerotandgVisor bot 558a78de55 Automated rollback of changelist 614015218
PiperOrigin-RevId: 614026488
2024-03-08 13:22:10 -08:00
Etienne PerotandgVisor bot 5f6dade838 Create Stable Diffusion XL Docker image and regression test.
PiperOrigin-RevId: 614015218
2024-03-08 12:40:36 -08:00
Andrei VaginandgVisor bot b27d4b5834 images: don't build unused images
Runtime and gpu tests are running on x86_64 only.

PiperOrigin-RevId: 613771002
2024-03-07 18:40:14 -08:00
Andrei VaginandgVisor bot 02000395de images: avoid huge image deltas
Multiple deltas are uploaded/downloaded in parallel.

PiperOrigin-RevId: 613592397
2024-03-07 08:29:51 -08:00
Etienne PerotandgVisor bot 35cb2282f0 Add a single-model ollama image.
Yes, it's yet another huge image (26GB) :)

This image is useful to benchmark checkpoint/restore performance.
To fairly measure it, we need an image that has only one model
preloaded into it, as this mirrors the situation where someone might
want to use checkpoint/restore for an inference model where there is
only one model to serve.

This image uses mixtral as a medium-large model. The larger the model,
the more important the gains in checkpoint/restore performance, so
measuring with a large model provides a more representative and
significant result.

PiperOrigin-RevId: 613335037
2024-03-06 14:10:26 -08:00