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

GROK-16923: implement web gpu colors support #3115

Conversation

Polaringu
Copy link
Collaborator

Added coloring for textures and dot types for scatterplot.
Implemented color caching and cache invalidation checks.
Introduced benchmarks for gpuRendering and gpuHitTest (see screenshot results on my PC with integrated AMD Radeon GPU on AMD Ryzen 7 7730U CPU)

image

import {awaitCheck, category, expect, expectArray, test, testEvent} from '@datagrok-libraries/utils/src/test';
import { _scWebGPURender } from '../package';

export const _package = new DG.Package();
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpicking but please remove these :D

import $ from 'cash-dom';

import {awaitCheck, category, expect, expectArray, test, testEvent} from '@datagrok-libraries/utils/src/test';
import { _scWebGPURender, _scWebGPUPointHitTest } from '../package';
Copy link
Collaborator

Choose a reason for hiding this comment

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

generally, this is a recipe for cyclic dependency errors :D

instead of these, use the native grok func calls and remove imports from package:

const renderFunc = DG.Func.Find({tags: ['webGPURenderTag']})[0]
const hitTestFunc = DG.Func.Find({tags: ['webGPUHitTestTag']})[0]

and then use the arguments in structured way (yes the typing is lost, but build will be smaller and you will avoid any cyclic dependencies)
await renderFunc.apply({sc: sc, show: true})

});
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

you also need to specify that this test is benchmark, otherwise it will always run on tests and might fail a lot in CI/CD. the third argument in test function is an object where you can specify that:
image

colorBuffer: GPUBuffer | null = null;
colorColumnName = '';
colorLength = -1;
colorAxisType: keyof typeof DG.AxisType = DG.AxisType.logarithmic;
Copy link
Collaborator

Choose a reason for hiding this comment

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

do I get this right that you initialize it to log because you expect a missmatch when linear comes by default?

@Polaringu Polaringu changed the title Opalamarchuk/grok-16923: implement web gpu colors support GROK-16923: implement web gpu colors support Oct 24, 2024
Alex Palamarchuk added 3 commits October 25, 2024 17:10
…lamarchuk/GROK-16923-Implement-WebGPU-colors-and-shapes-support
…pes-support' of ssh://github.com/datagrok-ai/public into opalamarchuk/GROK-16923-Implement-WebGPU-colors-and-shapes-support
@Polaringu Polaringu merged commit 66dbff9 into master Oct 25, 2024
40 of 48 checks passed
@Polaringu Polaringu deleted the opalamarchuk/GROK-16923-Implement-WebGPU-colors-and-shapes-support branch October 25, 2024 14:22
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.

2 participants