Skip to content

Add barrier after duplicated dispatches for benchmarking - #5919

Merged
antiagainst merged 2 commits into
iree-org:mainfrom
antiagainst:fix-bench-batch
May 18, 2021
Merged

antiagainst merged 2 commits into
iree-org:mainfrom
antiagainst:fix-bench-batch

Conversation

@antiagainst

Copy link
Copy Markdown
Member

Add a barrier after each clone. If the original dispatch has a small
problem size, simply duplicating without barrier will increasing the
number of subgroups and thus "help" filling the GPU. In the end we
will have an over optimistic result. Put in barriers avoids that,
but it assumes the input model is linear.

With this, the reported number reflects the kernel execution time
for MobileNetv2 with

iree-translate ... --iree-hal-benchmark-dispatch-repeat-count=32
iree-benchmark-module ... --batch_size=32

This is a step towards #5248.
Next is working on duplicating the command buffer submission
as a whole.

Add a barrier after each clone. If the original dispatch has a small
problem size, simply duplicating without barrier will increasing the
number of subgroups and thus "help" filling the GPU. In the end we
will have an over optimisitic result. Put in barriers avoids that,
but it assumes the input model is linear.

With this, the reported number reflects the kernel execution time
for MobileNetv2 with

```
iree-translate ... --iree-hal-benchmark-dispatch-repeat-count=32
iree-benchmark-module ... --batch_size=32
```

Next is working on duplicating the command buffer submission as a whole.
@antiagainst
antiagainst merged commit 5de6549 into iree-org:main May 18, 2021
@antiagainst
antiagainst deleted the fix-bench-batch branch May 18, 2021 18:01
@hanhanW hanhanW mentioned this pull request May 18, 2021
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