Skip to content

Force CPU benchmark to run on single thread. - #4751

Merged
hanhanW merged 1 commit into
iree-org:mainfrom
hanhanW:single-thread
Feb 5, 2021
Merged

hanhanW merged 1 commit into
iree-org:mainfrom
hanhanW:single-thread

Conversation

@hanhanW

@hanhanW hanhanW commented Feb 5, 2021

Copy link
Copy Markdown
Contributor

In the past, we only could run CPU on single thread. After 8d74bfa
landed, we are able to run on multiple threads, and it's turned on by
default. The PR forces it to run on single thread to keep the same
behavior.

Fixes #4686

In the past, we only could run CPU on single thread. After 8d74bfa
landed, we are able to run on multiple threads, and it's turned on by
default. The PR Forces it to run on single thread to keep the same
behavior.

Fixes iree-org#4686
@benvanik

benvanik commented Feb 5, 2021

Copy link
Copy Markdown
Collaborator

Can you also file an issue for adding a multithreaded version? As mentioned in #4686 we need one as that's what real apps would be doing, unlike pinning to a single core here. Thanks!

@hanhanW

hanhanW commented Feb 5, 2021

Copy link
Copy Markdown
Contributor Author

Can you also file an issue for adding a multithreaded version? As mentioned in #4686 we need one as that's what real apps would be doing, unlike pinning to a single core here. Thanks!

Filed, I will work on it!

I triggered a BuildKite build, will land it after verifying it.

@GMNGeoffrey GMNGeoffrey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Took a look at the logs, and this appears to bring the performance back to previous levels

@hanhanW
hanhanW merged commit f168c55 into iree-org:main Feb 5, 2021
@hanhanW
hanhanW deleted the single-thread branch February 5, 2021 19:01
This was referenced Feb 8, 2021
rsuderman pushed a commit to rsuderman/iree that referenced this pull request Feb 9, 2021
In the past, we only could run CPU on single thread. After 8d74bfa
landed, we are able to run on multiple threads, and it's turned on by
default. The PR forces it to run on single thread to keep the same
behavior.

Fixes iree-org#4686
This was referenced Feb 10, 2021
GMNGeoffrey added a commit that referenced this pull request Feb 10, 2021
* 707cf08 Merge pull request #4798=
* 8e5112d Move dispatch region creation for Linalg on tensors after all HLO passes. (#47..
* 59dcd0d Bump CMake minimum to 3.13.4 and remove dead code (#4792)
* 8a55a92 Adapt dispatch region creation to always clone metadata-like/simple operations..
* 46963f7 Disabling failing reverse linalg-on-tensors test. (#4788)
* 52a1fe6 Enable passing e2e/xla_ops linalg-on-tensors tests (#4779)
* 11a73b8 [CodeGen] Pack scf.for vector<8xf16> loop-carried values (#4775)
* 21b9520 [codegen] Enable vectorizing convolution with output height != 1 (#4758)
* 9d1e326 Add logic for better ordering of fusion. (#4772)
* d0cc95f Add CUDA SDK headers to third_party (#4776)
* d436f83 Use stack allocation on CPU side for Linalg on tensors path. (#4770)
* 3c3c5b4 Drop lowering for tensor::GenerateOp. (#4769)
* 0281bb7 Convert mhlo.const -> const whel running ConvertHLOToLinalgOnTensorsPass (#4763)
* 82ef99e Merge google -> main (#4755)
* 110a2f5 Merge pull request #4760 from google/benvanik-hal-simplification
* c639354 Resolve merge conflicts between main and google
* a299a32 Removing runtime hal.buffer.read_data/write_data/copy_data. The ops still exis..
* bc3b45a Removing runtime hal.buffer_view.compute_offset/compute_range. These are now c..
* 0498257 Removing runtime hal.buffer_view.dims.* and hal.buffer_view.subview. These are..
* 28d2cc4 Rematerialize DispatchWorkgroupsOp constant arguments (#4756)
* 056b016 Fixed iree tflite import to include required dialects. (#4754)
* f168c55 Force CPU benchmark to run on single thread. (#4751)
* a7c1bd2 Fixes to enable executing matmul on GPU. (#4745)
* 2325b05 Merge pull request #4743 from google/benvanik-reordering-1
* ff46a1e Add missing dependency for emitc shift test (#4747)
* 02704ab Fix include of EmitC generated headers (#4746)
* 4e09bd7 Unify patterns in the vm to emitc conversion (#4724)
* a3c888c Reordering hal.buffer_view.create/iree_hal_buffer_view_create args.
* 9743fa8 Reordering operands of flow.tensor.trace/hal.buffer_view.trace.
* 43b7562 Simplifying hal.command_buffer.execution_barrier. It was ignoring its args and..
* 7fd240f Remove unneeded ref_ptr dep.
* b0f8fd0 Reordering params in iree_hal_executable_layout_create. Progress on #4736.
* e511e25 Retain the backing device with python mapped array memory.
* c85a426 Enable lowering of Linalg on tensors on GPU. (#4688)
* 8939793 Rename ".module" to ".vmfb" in generated IREE bytecode modules. (#4729)
* 29c1c38 Removing abseil dep in tracing.h to make it ok for API exposure. (#4721)
* 9157230 Add VM tests for native integer arithmetics (#4725)
* a89c9d8 Add tests for log, exp, maximum, minimum, comparison, ceil and floor lowerings..

PiperOrigin-RevId: 356627846
GMNGeoffrey added a commit that referenced this pull request Feb 10, 2021
* 707cf08 Merge pull request #4798=
* 8e5112d Move dispatch region creation for Linalg on tensors after all HLO passes. (#47..
* 59dcd0d Bump CMake minimum to 3.13.4 and remove dead code (#4792)
* 8a55a92 Adapt dispatch region creation to always clone metadata-like/simple operations..
* 46963f7 Disabling failing reverse linalg-on-tensors test. (#4788)
* 52a1fe6 Enable passing e2e/xla_ops linalg-on-tensors tests (#4779)
* 11a73b8 [CodeGen] Pack scf.for vector<8xf16> loop-carried values (#4775)
* 21b9520 [codegen] Enable vectorizing convolution with output height != 1 (#4758)
* 9d1e326 Add logic for better ordering of fusion. (#4772)
* d0cc95f Add CUDA SDK headers to third_party (#4776)
* d436f83 Use stack allocation on CPU side for Linalg on tensors path. (#4770)
* 3c3c5b4 Drop lowering for tensor::GenerateOp. (#4769)
* 0281bb7 Convert mhlo.const -> const whel running ConvertHLOToLinalgOnTensorsPass (#4763)
* 82ef99e Merge google -> main (#4755)
* 110a2f5 Merge pull request #4760 from google/benvanik-hal-simplification
* c639354 Resolve merge conflicts between main and google
* a299a32 Removing runtime hal.buffer.read_data/write_data/copy_data. The ops still exis..
* bc3b45a Removing runtime hal.buffer_view.compute_offset/compute_range. These are now c..
* 0498257 Removing runtime hal.buffer_view.dims.* and hal.buffer_view.subview. These are..
* 28d2cc4 Rematerialize DispatchWorkgroupsOp constant arguments (#4756)
* 056b016 Fixed iree tflite import to include required dialects. (#4754)
* f168c55 Force CPU benchmark to run on single thread. (#4751)
* a7c1bd2 Fixes to enable executing matmul on GPU. (#4745)
* 2325b05 Merge pull request #4743 from google/benvanik-reordering-1
* ff46a1e Add missing dependency for emitc shift test (#4747)
* 02704ab Fix include of EmitC generated headers (#4746)
* 4e09bd7 Unify patterns in the vm to emitc conversion (#4724)
* a3c888c Reordering hal.buffer_view.create/iree_hal_buffer_view_create args.
* 9743fa8 Reordering operands of flow.tensor.trace/hal.buffer_view.trace.
* 43b7562 Simplifying hal.command_buffer.execution_barrier. It was ignoring its args and..
* 7fd240f Remove unneeded ref_ptr dep.
* b0f8fd0 Reordering params in iree_hal_executable_layout_create. Progress on #4736.
* e511e25 Retain the backing device with python mapped array memory.
* c85a426 Enable lowering of Linalg on tensors on GPU. (#4688)
* 8939793 Rename ".module" to ".vmfb" in generated IREE bytecode modules. (#4729)
* 29c1c38 Removing abseil dep in tracing.h to make it ok for API exposure. (#4721)
* 9157230 Add VM tests for native integer arithmetics (#4725)
* a89c9d8 Add tests for log, exp, maximum, minimum, comparison, ceil and floor lowerings..

PiperOrigin-RevId: 356627846
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.

MobileBert Performance Regression on Pixel 4 CPU at 8d74bfa28dd35203fba700aa1f1d88c200c848cd

3 participants