History log of /frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c2f647a6c790cb1f4c86e50506c53cd912e725f6 04-Mar-2017 I-Jui (Ray) Sung <ijsung@google.com> Compiler and runtime support for global allocation metadata

On the compiler side, enumerate used global allocations, assign each used
global allocation a unique ID, and record the mapping in an OpString
in the result SPIR-V code. The ID is the index of the metadata
for the global allocation.

On the runtime side, added a new RSoVBuffer for metadata, and with code
marshaling them for the kernel according to the mapping reported by the
compiler. SPIRIT is linked against the driver for extracting metadata
out of the SPIR-V module.

Added a new testcase for global allocation metadata in RSoVTest.

Bug: 30964317
Test: RSoVTest on Angler, RSoV LIT Tests
Change-Id: I66b3cfa8b66ee2b60b984320900dbe2dc3d15f21
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
ae8d5acd42d52078894cdfc1a2d71988387b2e23 03-Mar-2017 Yang Ni <yangni@google.com> Removed KernelSignature class

Bug: 30964317

No longer used.

Also made other minor cleanups: Moved an #include from a .h to .cpp
file; And removed an unused unimplemented method.

Test: lit tests

Change-Id: I0cbf4bba42b90acecd466beb255d5593faaa186f
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
7f8c490e872221221cbfe213c99d1104c483c3a4 01-Mar-2017 I-Jui (Ray) Sung <ijsung@google.com> Handle global allocations for 64-bit targets

On 64-bit targets global allocations are not promoted to registers and take
memcpys instead when accessed, so the analysis in global allocation LLVM
pass is extended to handle that case. A new LIT testcase is added.

This CL also removed global allocation declarations from LLVM IR to
prevent them from showing in the result SPIR-V code, which otherwise
may crash certain Vulkan drivers.

Bug: 30964317
Test: RSoVTest, RSoV lit tests
Change-Id: Id8531781599130c152816d7eb551999458c075e2
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
c7b3a43821ccf0f2b13840246e1895744799cf6b 01-Mar-2017 Yang Ni <yangni@google.com> Clean up rs2spirv code

Bug: 30964317

Moved tests/globals/getdimx.ll and rewrite_getdim.ll into tests/rs_allocation.

Removed unneeded #include's, and adjusted #include order.

Removed print-as-words command-line option.

Removed some dead code.

Test: lit tests and RSoVTest

Change-Id: I263987597b8c1ec7aa5593157580aa3ad65861a1
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
9d73d08c545462e706ef6951952acff94c37605a 23-Feb-2017 I-Jui (Ray) Sung <ijsung@google.com> LLVM and SPIRIT transformations for global allocations

This is the initial compiler-side transformations for global allocation
support.

Added an LLVM pass to lower rsAllocationDimX calls for later SPIRIT
passes. References to alllocations in those calls are lowered into some
unique ID representing allocations of a module.

Also added a SPIRIT pass to transform lowered accessor
(rsAllocationGetDimX) in previous pass to SPIR-V load instructions from
the metadata buffer.

Generate global allocation metadata, necessary SPIR-V decorations and
declarations in the wrapper generation stage for the generated load
instrutions.

Bug: 30964317
Test: RSoV lit tests, SPIRIT unit tests
Change-Id: I00846c255bd76e77c89a16de0e553acc5f73bbfe
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
bf22a8ab4f46a98ee37f95fc0402744132cc3ed2 07-Feb-2017 Yang Ni <yangni@google.com> Rewrite rs2spirv using spirit

Bug: 30964317

Rewrote the wrapper generation and builtin/runtime function
translation passes in rs2spirv using spirit.

Also added support for about a dozen more floating-point builtin
math functions.

Added support for new-style root kernel with lit test. Added check
for old-style kernels with lit test. Updated existing lit tests
since generated code are slightly different, mostly on temp names.

Added SPIR-V validation to all lit tests.

Updated the RSoV driver to work with the new spirit-based compiler.

The entry point is now named entry_<kernel name>.

Fixed an issue with multi-input kernel, so that the type count is
correctly set.

Minor cleanup to destroy descriptor sets after a kernel launch
and to remove an outdated comment.

Test: lit tests and RSoVTest

Change-Id: I07b5957667892e532dcbc2da98ed38fe783af5e9
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
7974fc03e11f3a8dd40f794f3b33b4889483090c 09-Feb-2017 Rahul Chaudhry <rahulchaudhry@google.com> frameworks/rs: fix typos and clang-tidy warnings

This change fixes a few typos and clang tidy warnings related to the
"llvm-namespace-comment" checks.

Bug: 26936282
Test: WITH_TIDY=1 WITH_TIDY_CHECKS="llvm-namespace-comment" mm
Change-Id: Ic65182e5b4999fbd48d6a8ad7172e4bfeeb541f4
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp
6749f541c20e86f5deb6fd421ed5849ef43c275c 08-Nov-2016 Yang Ni <yangni@google.com> Initial backend compiler for RSoV

Bug: 30964317

This compiler compiles RenderScript LLVM bitcode into SPIR-V.

This was done by Jakub Kuderski as part of his 2016 summer internship
at Google.

Test: build

Change-Id: I395cdab2b97451b9e0a9b866af2d112ead73ab72
/frameworks/rs/rsov/compiler/RSAllocationUtils.cpp