Commit graph

19 commits

Author SHA1 Message Date
Jeroen Bakker
64ac8ada59 Benchmark: Vulkan device selection
This PR allows to run benchmarks on multiple GPUs (one at a time).
It also contains some fixes to the reporting and normalization of the
device ID's.

Device ID normalization is done as some existing configs only contain
`VULKAN` which need to be matched against `VULKAN_0` and vise-versa.

Device selection doesn't use `blender --gpu-device help` to detect devices
as that option doesn't exist in older builds.

Now with fixed python validations.

Original Pull Request: https://projects.blender.org/blender/blender/pulls/158898

Pull Request: https://projects.blender.org/blender/blender/pulls/159234
2026-05-28 16:28:15 +02:00
Jeroen Bakker
04a40d91a7 Revert "Benchmark: Vulkan device selection"
This reverts commit abe6a79025.
It breaks test cases (Pydoc)

Pull Request: https://projects.blender.org/blender/blender/pulls/159230
2026-05-28 15:41:50 +02:00
Jeroen Bakker
abe6a79025 Benchmark: Vulkan device selection
This PR allows to run benchmarks on multiple GPUs (one at a time).
It also contains some fixes to the reporting and normalization of the
device ID's.

Device ID normalization is done as some existing configs only contain
`VULKAN` which need to be matched against `VULKAN_0` and vise-versa.

Device selection doesn't use `blender --gpu-device help` to detect devices
as that option doesn't exist in older builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/158898
2026-05-28 13:58:50 +02:00
Jeroen Bakker
8330c0d53e Fix: Benchmark: Incomplete error message
When devices could not be received the error message didn't contain
the actual backend, but only a placeholder. This was due to missing
format prefix.

Pull Request: https://projects.blender.org/blender/blender/pulls/158631
2026-05-15 11:36:52 +02:00
Jeroen Bakker
c520147eaf Cleanup: Benchmark: Prefer blender_args for gpu backend selection
Pull Request: https://projects.blender.org/blender/blender/pulls/155469
2026-03-13 08:38:33 +01:00
Jeroen Bakker
b0e2dbcc6a Benchmark: Add device name to EEVEE tests
Adding the actual GPU device name and host CPU to the test results.
For Cycles the CPU isn't that important when using GPUs as it would
mostly perform the scheduling, however when running EEVEE tests the
CPU is more involved.

This PR will extract the correct GPU device names and adds the CPU name
to a separate identifier. The used CPU is then added to the report, when
found in the results and different than the test device.

Pull Request: https://projects.blender.org/blender/blender/pulls/155419
2026-03-10 13:04:02 +01:00
Jeroen Bakker
9ceaae84c2 Benchmark: Add GPU backend to EEVEE tests
Adding support to use multiple GPU backends when running EEVEE
performance tests.

The backends to test can be configured in the devices property of the
config. When not explicitly configured it will run with 'CPU' device.

```python
devices = ['CPU', 'OPENGL', 'VULKAN']
tests = ['*']
categories = ['eevee']
revisions = {
    'v5.2': 'b9d4616281',
    'v5.1': '34ce889d74',
}
```

Every test can override `supported_device_types` to tell the runner
for which device type it should run the test.

This change will also remove the `time` field from the report as it
isn't useful for EEVEE viewport tests. It was initially added to be
compatible with the Cycles test.

See PR for example reports and output.

Pull Request: https://projects.blender.org/blender/blender/pulls/154117
2026-02-16 16:30:21 +01:00
Alaska
7a47762c20 Benchmark: Enable OSL in Cycles performance benchmark tool
This commit gives users of the Cycles performance benchmark tool the
option to run performance benchmarks with OSL enabled for CPUs
and OptiX devices.

This can be done by adding `-OSL` to the device name:
`CPU-OSL`
`OPTIX-OSL_0`

Pull Request: https://projects.blender.org/blender/blender/pulls/136506
2025-03-26 23:52:14 +01:00
Sergey Sharybin
60ca0742cb Benchmark: Support running benchmark with HW RT enabled
Similar to the regression tests it is possible to append -RT suffix
to the compute type to enable hardware ray-tracing.

For example HIP_0 will run benchmark on first HIP device without
hardware ray-tracing, HIP-RT_0 will run benchmark on the same device
but will enable hardware ray-tracing.

The downside of this change is that it will make it so METAL device
will no longer use HW-RT on M3 and aboce, and explicit METAL-RT is
to be used. This is because benchmark was relying on the Auto
configuration which has different behavior depending on the device
generation.

Pull Request: https://projects.blender.org/blender/blender/pulls/136308
2025-03-24 15:47:42 +01:00
Iliya Katueshenock
ea7d97ae48 Tests: Avoid error in performance tests with lite build
There is no Cycles add-on in a lite build.

Pull Request: https://projects.blender.org/blender/blender/pulls/120442
2025-01-25 21:12:45 +01:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton
89811cb96f Cleanup: unused-imports in tests/ 2023-07-25 21:43:53 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Patrick Mours
8a32d56056 Tests: Fix device list of benchmark script only showing a single GPU
Pull Request #104583
2023-02-10 19:38:37 +01:00
Campbell Barton
c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Brecht Van Lommel
cc653c9b02 Fix potential render tests error with invalid utf-8 characters
In general should not happen, but better to report the actual error instead
of the Python test code failing.
2021-09-28 20:50:38 +02:00
Campbell Barton
432bfbf7a3 Cleanup: pep8 2021-07-06 12:05:27 +10:00
Brecht Van Lommel
dc3f46d96b Tests: performance testing framework
These are scripts for benchmarking Blender features on real-world .blend
files. They were originally written for benchmarking Cycles performance, and
were made generic so they can be used for more Blender features.

The benchmarks can be run locally by developers. But the plan is to also run
these as part of continuous integration to track performance over time.

Currently there are tests for Cycles rendering and .blend file loading.

Documentation:
https://wiki.blender.org/wiki/Tools/Tests/Performance

Main features:
* User created configurations to quickly run, re-run and analyze a selected
  subset of tests.
* Supports both benchmarking with existing builds, and automatic building of
  specified git commits, tags and branches.
* Generate HTML page with bar and line graphs from test results.
* Controlled using simple command line tool.
* For writing tests, convenient abstraction to run a Python function in Blender
  with arguments and return value.

Ref T74730

Differential Revision: https://developer.blender.org/D11662
2021-07-05 12:32:32 +02:00