WIP:Interleaved slices for better work distriubtion with a Multi-GPU/CPU setup #4

Closed
William Leeson wants to merge 0 commits from blender/blender:main into work_sets_similar

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Why

To improve the distribution of work between GPUs by giving them a set of work that should take roughly the same amount of time.

What

This patch adds an option to the cycles performance category called "interleaved slices". This splits the work load by giving each device a set of scan lines such that the one with the smallest weight w_{smallest} gets 1 scan line and the others get n_i = w_i/w_{smallest}. The scaliness for each device are interleaved such that the first device takes the first n_0 and the second gets the next n_1 + }$ and so on. The set of scan lines are reassigned each time the weights change.

This pull request is based on that in 108147 I could not find a way to change the branch being merged from so I started a new one.

## Why To improve the distribution of work between GPUs by giving them a set of work that should take roughly the same amount of time. ## What This patch adds an option to the cycles performance category called "interleaved slices". This splits the work load by giving each device a set of scan lines such that the one with the smallest weight $w_{smallest}$ gets 1 scan line and the others get $n_i = w_i/w_{smallest}$. The scaliness for each device are interleaved such that the first device takes the first $n_0$ and the second gets the next $n_1$ + }$ and so on. The set of scan lines are reassigned each time the weights change. This pull request is based on that in [108147](https://projects.blender.org/blender/blender/pulls/108147) I could not find a way to change the branch being merged from so I started a new one.
William Leeson added 8 commits 2023-07-21 15:37:03 +02:00
Change the `makesdna` error message from:

```
Align struct error: Bone color
```

to:

```
Align struct error: Bone::color (starts at 180 on the native platform;  180 % 8 = 4 bytes)
```

This has a few advantages:

- The colon notation (`Bone::color`) makes it easier to recognise that this is about a specific struct field.
- It makes it clear that this is about the start/offset of the inner struct.
- It includes the math the check is actually doing, providing concrete information on how to change the code to fix the issue.

Pull Request: blender/blender#110291
This refactors the `ramer_douglas_peucker_simplify` function to be more generic.

No functional changes expected.

Pull Request: blender/blender#110338
This was an oversight on the license headers copyright pass [1].

Also since the manual reference is generated by this script
we can update the copyright year every time.

[1] - 8f109712ee
Even if a text datablock was "used" by in the Text Editor, it would be
lost after save/reload if no fake user is set.

This is not in line with other datablocks if they are used by an editor
(e.g. images, clips, masks etc.).

Now handle this with `IDWALK_CB_USER_ONE` (instead of `IDWALK_CB_NOP`)
in `id_refcount_recompute_callback` >
`BKE_screen_foreach_id_screen_area` which re-ensures a user is set.

(Bit on shaky ground here, but this seems like this is how this is
handled for other editors "consuming" a datablock).

Pull Request: blender/blender#110344
Introduces a strategy pattern for the implementation of the various
armature drawing modes. Instead of having to `switch (arm->drawtype)`
(or `if`/`else if`/`else` chains) everywhere, one function is used to
select the appropriate `ArmatureBoneDrawStrategy` subclass.

In the future this class could be expanded even further. Currently there
are still places where there are explict checks for the draw type,
making it cumbersome to add new types. For now I feel it's already a
good enough move forward; future extensions can be done in later PRs.

No functional changes.

Pull Request: blender/blender#106232
William Leeson changed title from WIP:Interleaved slices for better work distriubtion with a Multi-GPU/CPU setup to WIP:Interleaved slices for better work distriubtion with a Multi-GPU/CPU setup 2023-07-21 15:41:00 +02:00
William Leeson closed this pull request 2023-07-21 15:41:06 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: leesonw/blender-cluster#4
No description provided.