From 62445b7d5bcdde3e583de2cab5f8015e5cb725bb Mon Sep 17 00:00:00 2001 From: Xusong Wang Date: Mon, 15 Mar 2021 17:09:37 -0700 Subject: [PATCH] Document the default alignment and padding value. This CL documents the default value of the preferred alignment and padding for request memories. Bug: 179799921 Test: m Change-Id: I89c16c3e20939a0ad68d9e3b0061c4a16dc00d8b Merged-In: I89c16c3e20939a0ad68d9e3b0061c4a16dc00d8b (cherry picked from commit e6dcc9a38d3fbc2cbd957577657493e36783d3ed) --- .../aidl/android/hardware/neuralnetworks/DataLocation.aidl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neuralnetworks/aidl/android/hardware/neuralnetworks/DataLocation.aidl b/neuralnetworks/aidl/android/hardware/neuralnetworks/DataLocation.aidl index 1b2378f016..f656360ff9 100644 --- a/neuralnetworks/aidl/android/hardware/neuralnetworks/DataLocation.aidl +++ b/neuralnetworks/aidl/android/hardware/neuralnetworks/DataLocation.aidl @@ -35,6 +35,11 @@ package android.hardware.neuralnetworks; * total size of the writable region of the output data, and padding specifies the extra bytes at * the end of the memory region that may be used by the device to access memory in chunks, for * efficiency, but must not be used to hold any output data. + * + * When used in RequestArgument, clients should prefer to align and pad the sub-region to + * 64 bytes when possible; this may allow the device to access the sub-region more efficiently. + * The sub-region is aligned to 64 bytes if the value of offset is a multiple of 64. + * The sub-region is padded to 64 bytes if the sum of length and padding is a multiple of 64. */ @VintfStability parcelable DataLocation {