-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
7af1d75
to
21358eb
Compare
...es/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/webgl-aggregation-transform.ts
Outdated
Show resolved
Hide resolved
} | ||
|
||
dimensions: 1 | 2; | ||
numChannels: 1 | 2 | 3; |
There was a problem hiding this comment.
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)
...es/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/webgl-aggregation-transform.ts
Show resolved
Hide resolved
...es/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/webgl-aggregation-transform.ts
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/webgl-bin-sorter.ts
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/webgl-bin-sorter.ts
Show resolved
Hide resolved
test/modules/aggregation-layers/aggregation-layer-v9/gpu-aggregator.spec.ts
Outdated
Show resolved
Hide resolved
af9e3ff
to
dd55918
Compare
21358eb
to
c49810a
Compare
7984f42
to
c6fae8c
Compare
c6fae8c
to
a9f0504
Compare
modules/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/gpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/gpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/gpu-aggregator/gpu-aggregator.ts
Outdated
Show resolved
Hide resolved
/** An Aggregator implementation that calculates aggregation on the GPU */ | ||
export class GPUAggregator implements Aggregator { |
There was a problem hiding this comment.
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. :)
There was a problem hiding this comment.
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.
For #7457
Change List
GPUAggregator