Skip to content

Latest commit

 

History

History
127 lines (73 loc) · 2.39 KB

DOCUMENTATION_OPTIONS.md

File metadata and controls

127 lines (73 loc) · 2.39 KB

Marawacc Advanced Options

Marawacc supports differents options to track the kernel generation, graalIR information and OpenCL internal debug information and also explore different optimimizations.

OpenCL Device/Vendor Selection

There are two options to change the vendor selection and platform. I recommend the VM option. I just kept the env for compatibility with previous versions.

With env variable

Choose a specific OpenCL vendor for CPU. It could be "INTEL" or "AMD"

$ export GRAAL_CPU_PLATFORM="INTEL"

Chosse a specific OpenCL vendor for GPU. It could be "NVIDIA" or "AMD"

$ export GRAAL_GPU_PLATFORM="NVIDIA"

Option in the VM

CPU: The platform could be INTEL or AMD.

-Dmarawacc.cpu.platform=INTEL 

GPU: The platform could be NVIDIA or AMD

 -Dmarawacc.gpu.platform=NVIDIA 

VM Options for debugging

Print the autogenerated kernel (False by default)

  -Dmarawacc.printOCLKernel=true

Print the GraalIR that will be used for OpenCL kernel generation (after optimizations).

  -Dmarawacc.printGraalIR=true

Print OpenCL calls (kernel compilation, platform and device information, ...)

  -Dmarawacc.printOCLInfo=true

Dump Graph IR with IGV

  -Dmarawacc.dumpGraph=true

Include Debug information of what it being generated from the Graal IR

  -Dmarawacc.debugOCLKernel=true  // false by default

VM Options for optimizations

Compile OpenCL kernel with fast relaxed math

  -Dmarawacc.relaxMathKernel=true  // false by default

Guards in OpenCL coming from Truffle languages, it is true by default.

  -Dmarawacc.guards=true

Experimental option: generate vector types for OpenCL (false by default)

  -Dmarawacc.useVectorTypes=true

Pre-Warming up

It runs an empty kernel in a separated thread for switching the GPU to high-performance. When the real application comes in, the thread is stopped and the new kernel is executed on the GPU. This has a positive impact in performance for AMD GPUs.

-Dmarawacc.gpu.warmingup=TRUE

Alternatively, for older Graal versions:

$ export GRAAL_WARMINGUP="TRUE"

Eclipse Options

-jvmci -XX:-BootstrapJVMCI -XX:-UseJVMCIClassLoader -Dmarawacc.printOCLKernel=true -Dmarawacc.printOCLInfo=true