Skip to content

Add new metrics to MobileBert benchmarks. - #5191

Closed
hanhanW wants to merge 4 commits into
iree-org:mainfrom
hanhanW:new-metrics
Closed

hanhanW wants to merge 4 commits into
iree-org:mainfrom
hanhanW:new-metrics

Conversation

@hanhanW

@hanhanW hanhanW commented Mar 22, 2021

Copy link
Copy Markdown
Contributor

No description provided.

@google-cla google-cla Bot added the cla: yes label Mar 22, 2021
@hanhanW
hanhanW marked this pull request as draft March 22, 2021 17:13
@hanhanW

hanhanW commented Mar 22, 2021 •

Copy link
Copy Markdown
Contributor Author

@MaheshRavishankar I have the doc to set this up, not send out yet. However, this is still not available to benchmark on Android. Hit the same issue in #5152

Error log:

../iree/modules/hal/hal_module.c:742: OUT_OF_RANGE; binding count 36 > 32; while invoking native function hal.descriptor_set_layout.create; while calling import

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

FYI : @asaadaldien . Was just chatting with Ahmed who hit this issue.

I was hoping that the non-splat constants being inlined will help a bit here. If not, we need to add a mechanism here to control fusion. Right now the elementwise operations fuse everything it can, but that has a cost.

One way to control this is to have a callback function to the elementwise operation fusion pattern, that once it has decided that a producer can be fused with the consumer will invoke a callback to check if it should go ahead with the fusion. Here we could bail if we hit some limits. The mechanism goes into core. The actual callback will live in IREE. I can file an issue for tracking this.

Any takers?

@hanhanW

hanhanW commented Apr 2, 2021

Copy link
Copy Markdown
Contributor Author

This still does not work because it takes real weight. I tested locally and remotely, I got the same error, ie OUT_OF_RANGE; binding count 36 > 32; while invoking native function hal.descriptor_set_layout.create;.

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

This still does not work because it takes real weight. I tested locally and remotely, I got the same error, ie OUT_OF_RANGE; binding count 36 > 32; while invoking native function hal.descriptor_set_layout.create;.

I am working on adding a cost model upstream to limit fusion. But thats not a satisfactory solution.

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

This still does not work because it takes real weight. I tested locally and remotely, I got the same error, ie OUT_OF_RANGE; binding count 36 > 32; while invoking native function hal.descriptor_set_layout.create;.

In the meantime, could you increase the limit of constants inlined to 2048 and try?

@hanhanW

hanhanW commented Apr 2, 2021

Copy link
Copy Markdown
Contributor Author

This still does not work because it takes real weight. I tested locally and remotely, I got the same error, ie OUT_OF_RANGE; binding count 36 > 32; while invoking native function hal.descriptor_set_layout.create;.

In the meantime, could you increase the limit of constants inlined to 2048 and try?

I already tried. I think this is because they are real weights, not small constants or splat constants.

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

This still does not work because it takes real weight. I tested locally and remotely, I got the same error, ie OUT_OF_RANGE; binding count 36 > 32; while invoking native function hal.descriptor_set_layout.create;.

In the meantime, could you increase the limit of constants inlined to 2048 and try?

I already tried. I think this is because they are real weights, not small constants or splat constants.

That limit should work for non-splat constants too.

@hanhanW hanhanW closed this Apr 19, 2021
@hanhanW
hanhanW deleted the new-metrics branch May 6, 2026 17:17
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