3

I am researching RenderScript in an university project. We wanted to find the scheduler that selects where the RenderScript code will run (on the CPU? The GPU? A DSP?) and study how it makes this choice.

The problem is, we couldn't find the source code of anything related to a scheduler. In fact, we couldn't find a single reference to the term "GPU" in the source code.

This is what we found about RenderScript in the Android source:

The question is, did we miss something? Are there any other renderscript-related source codes that we didn't list above? Because we are not finding anything related to a scheduler in these sources.

RenatoUtsch
  • 1,449
  • 1
  • 13
  • 20
  • 1
    From what I understand the 'scheduler' is in the manufacturer binary blob which will ingest LLVM bitcode and perform the execution similar to a OpenGL driver blob which reads in GL Shader Language. You can force the app to use the reference CPU implementation: http://stackoverflow.com/questions/18753935/forcing-renderscript-to-run-on-cpu-or-gpu-atleast-for-performance-tuning-purpos but otherwise how the blob/driver determines that any code would run on GPU/CPU/DSP isn't openly available. – Morrison Chang Jul 08 '15 at 16:52
  • Okay, that makes sense. But this reference CPU implementation, is it open anywhere? – RenatoUtsch Jul 08 '15 at 17:13
  • 1
    Its in the RenderScript directory: https://android.googlesource.com/platform/frameworks/rs/+/master/cpu_ref/ – Morrison Chang Jul 08 '15 at 17:21
  • @RenatoUtsch Hi do you have any result on this topic? I am very interested in this? THX – Coroner_Rex Feb 15 '17 at 07:19
  • @Coroner_Rex we gave up on trying to change RenderScript's "scheduler", as it lies on proprietary, closed source code. Each device vendor (CPU, GPU, etc) implements their own code. We ended up building something on top of OpenCL because of that (https://github.com/ParallelME/runtime). Unfortunately not all phones support OpenCL, so we fallback to RenderScript in that case. – RenatoUtsch Feb 15 '17 at 11:13

0 Answers0