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

Reduce normal register loads #263

Merged
merged 3 commits into from Mar 5, 2020
Merged

Conversation

AdamHillier
Copy link
Contributor

@AdamHillier AdamHillier commented Mar 4, 2020

What do these changes do?

This change swaps some of the (normal, non-SIMD) registers used for intermediate results in the ARM64 binary conv kernels, in such a way that reloading several parameters from memory is no longer necessary.

Two additional registers are used by the kernel (which were previously unused): x14 and x15.

Three ldr memory read instructions have been eliminated.

How Has This Been Tested?

The ARM64 tests pass locally.

Benchmark Results

Benchmark results (μs) on a Raspberry Pi 4 (1 thread) on QuickNet Large: 78828.5 -> 78580.3.

Results are the average of 500 runs but the results are so close that there probably isn't a meaningful difference here.

@AdamHillier AdamHillier changed the title Reduce reads Reduce normal register loads Mar 4, 2020
@AdamHillier
Copy link
Contributor Author

@larq/compute-engine any idea why the CI isn't running?

@lgeiger
Copy link
Member

lgeiger commented Mar 4, 2020

Any idea why the CI isn't running?

Oh, I think we've configured CI to only run on push, since this is a PR from a fork, it doesn't work.
@AdamHillier to you want to change it according to larq/zookeeper#62?

@AdamHillier AdamHillier requested a review from a team March 4, 2020 15:24
@AdamHillier AdamHillier added the internal-improvement Internal Improvements and Maintenance label Mar 4, 2020
@lgeiger
Copy link
Member

lgeiger commented Mar 4, 2020

The MLIR_Python failure is unrelated. Not sure what's going on with CI there.

@AdamHillier
Copy link
Contributor Author

Now there's different CI failures that are unrelated to the code. The Git checkout is failing for some bizarre reason.

@lgeiger
Copy link
Member

lgeiger commented Mar 4, 2020

The Git checkout is failing for some bizarre reason.

Looks like this might be a problem with the git submodule checkout, though I don't see any failure on master.

@lgeiger
Copy link
Member

lgeiger commented Mar 4, 2020

Looks like this might be a problem with the git submodule checkout, though I don't see any failure on master.

I just rebased and it seems the checkout fine now. After actions/checkout#173 is merged we should upgrade to the new checkout actions which hopefully will be less flaky.

@AdamHillier AdamHillier merged commit 4877c9b into larq:master Mar 5, 2020
@AdamHillier AdamHillier deleted the reduce-reads branch March 5, 2020 10:20
Tombana pushed a commit that referenced this pull request Apr 6, 2021
* Move two CortexM tests from GTest to TFLite testing

GTest is replaced with the TFLiteMicro testing framework, making it
possible to run these tests also on the CortexM. The two tests for
which this is done don't used advanced features (parameter sweep)
and therefore work equally well without GTest.

* Add two existing tests for the CorexM target

Added two existing tests for BGEMV and the quantized multiplier to
the build_lcem script to run on CortexM. The tests are slightly
modified since std::cerr and the C++ random number generator are
not available.

* Fix Bazel linter issues

* Fix compilation error with std::round for RISC-V

* Fix issues for RISC-V target

* Improve QEMU check in build script

* Fix error reporting and micro compiler flags

* Fix issue with tflite error reporting

Co-authored-by: Cedric Nugteren <cedric@plumerai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-improvement Internal Improvements and Maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants