Skip to content

Conversation

@kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Sep 23, 2020

This allows apps to request information about individual available
adapter limits, which lets the UA track privacy budgeting with
better granularity.

See also #489, #495; #1098.

@litherum PTAL; does this address concerns with #489?


Preview | Diff

@kainino0x kainino0x requested review from kvark and litherum September 23, 2020 00:24
@Kangz
Copy link
Contributor

Kangz commented Sep 23, 2020

Do we think there are going to be limits that are vectors of values?

@kainino0x kainino0x changed the title Add a limit-querying API for Add a limit-querying API for GPUAdapter Sep 23, 2020
@kainino0x
Copy link
Contributor Author

kainino0x commented Sep 23, 2020

Do we think there are going to be limits that are vectors of values?

Maybe, but it should be fine to change the signatures later if needed. Perhaps supportsLimit wouldn't be allowed for them.

@kainino0x
Copy link
Contributor Author

PTAL

Copy link
Contributor

@Kangz Kangz left a comment

Choose a reason for hiding this comment

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

It's interesting to design an API with the privacy budget in mind but I don't think there's state of the art. Maybe we should ask privacy budget folks to review this or an explainer of this change?

kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Oct 1, 2020
Extracted from gpuweb#1100 (and without the introduction of GPULimitName).
kvark pushed a commit that referenced this pull request Oct 1, 2020
Extracted from #1100 (and without the introduction of GPULimitName).
This allows apps to request information about individual available
adapter limits, which lets the UA track privacy budgeting with
better granularity.

See also gpuweb#489, gpuweb#495; gpuweb#1098.
@litherum
Copy link
Contributor

litherum commented Oct 5, 2020

The objection we had to #489 applies to getLimit here. We should at least remove getLimit. In addition, I don't actually think getLimit is implementable on Metal. On Metal, we have MTLDevice.supportsFamily() and MTLDevice.supportsFeatureSet(). The device doesn't expose what the limits are directly.

On a more general note, I thought the group agreed to bucketing devices into similar-sized buckets for privacy. This kind of API should probably just tell the author which bucket they're in.

@Kangz
Copy link
Contributor

Kangz commented Oct 5, 2020

We should at least remove getLimit. In addition, I don't actually think getLimit is implementable on Metal. On Metal, we have MTLDevice.supportsFamily() and MTLDevice.supportsFeatureSet(). The device doesn't expose what the limits are directly.

There's the Metal feature set tables that could be used by implementations to map from Metal device families and feature set to concrete limits. This will be necessary to do even if the limits are exposed only on the GPUDevice (and not the GPUAdapter) so that applications can now what they can rely on.

On a more general note, I thought the group agreed to bucketing devices into similar-sized buckets for privacy. This kind of API should probably just tell the author which bucket they're in.

The UAs can bucket for sure, but I don't think we agreed that this group should define buckets (yet?) because the definition of the buckets will likely be difficult discussions based on the devices each participant cares about.

@kainino0x
Copy link
Contributor Author

The objection we had to #489 applies to getLimit here.

Thanks for the info. It's been a long time and I wasn't sure whether the objection was to the inclusion of e.g. getLimit, or the lack of e.g. supportsLimit.

I don't have any further stuff to say right now (other than what Corentin said above + the meeting discussion), but I do still think that getLimit is implementable and should be included.

@kdashg
Copy link
Contributor

kdashg commented Oct 13, 2020

@kainino0x kainino0x closed this Dec 3, 2020
@kainino0x kainino0x deleted the adapter-limits branch December 3, 2020 20:04
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Dec 3, 2020
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Dec 3, 2020
@kainino0x kainino0x mentioned this pull request Dec 3, 2020
kainino0x added a commit that referenced this pull request Dec 15, 2020
I think it's been determined that this API shouldn't consider privacy budgeting in it's design.

- UAs can still lazily-decide on GPULimits values.
- UAs can still do bucketing ahead of time, or even based on queries to GPULimits members.
- Apps can attempt requestDevice without checking limits, if they just want to know if their requested limits are supported.

Exact IDL interface is TBD, but editorial.

Needs more text to be filled out later. Also adds some other TODOs.

See also #489, #495; #1098, #1100.
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
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.

5 participants