Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU Aggregation (2/8): GPUAggregator #8887

Merged
merged 6 commits into from
Jun 19, 2024
Merged

GPU Aggregation (2/8): GPUAggregator #8887

merged 6 commits into from
Jun 19, 2024

Conversation

Pessimistress
Copy link
Collaborator

@Pessimistress Pessimistress commented May 12, 2024

For #7457

Change List

  • Add GPUAggregator
  • Tests

}

dimensions: 1 | 2;
numChannels: 1 | 2 | 3;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make the Aggregator class generic on the number of channels? That way we could catch out of bounds access at compile time, e.g.

type 3Channel = 0 | 1 | 2;
new GPUAggregator<3Channel>(...)
getResult(channel: Channels)

Base automatically changed from x/aggregation-1 to master June 10, 2024 00:54
@Pessimistress Pessimistress force-pushed the x/aggregation-2 branch 2 times, most recently from 7984f42 to c6fae8c Compare June 10, 2024 01:22
@coveralls
Copy link

Coverage Status

coverage: 89.766% (+0.09%) from 89.672%
when pulling a9f0504 on x/aggregation-2
into 9351848 on master.

Comment on lines 44 to 45
/** An Aggregator implementation that calculates aggregation on the GPU */
export class GPUAggregator implements Aggregator {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that GPU aggregation looks very different in WebGPU ... do we see GPUAggregator as generalizing over WebGL and WebGPU? Or should there be separate WebGLAggregator vs. WebGPUAggregator classes?

Apologies if I've missed or forgotten a prior thread on this, and please ignore this if it's going to distract from progress on this great stack of PRs. :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan is to have a separate class for WebGPU. I agree this should be called WebGLAggregator.

@coveralls
Copy link

Coverage Status

coverage: 89.766% (+0.09%) from 89.672%
when pulling aa8b3fd on x/aggregation-2
into 9351848 on master.

@Pessimistress Pessimistress merged commit 92363b3 into master Jun 19, 2024
4 checks passed
@Pessimistress Pessimistress deleted the x/aggregation-2 branch June 19, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants