org.apache.sysml.runtime.instructions.gpu.context

Class JCudaKernels

  • java.lang.Object
    • org.apache.sysml.runtime.instructions.gpu.context.JCudaKernels


  • public class JCudaKernels
    extends Object
    Utility class that allows LibMatrixCUDA as well as GPUObject to invoke custom CUDA kernels.

    The utility org.apache.sysml.runtime.instructions.gpu.context.JCudaKernels simplifies the launching of the kernels. For example: to launch a kernel copyUpperToLowerTriangleDense<<1,1,32,32>>(jcudaDenseMatrixPtr, dim, dim*dim) , the user has to call: kernels.launchKernel("copyUpperToLowerTriangleDense", new ExecutionConfig(1,1,32,32), jcudaDenseMatrixPtr, dim, dim*dim)

    • Method Detail

      • launchKernel

        public void launchKernel(String name,
                                 ExecutionConfig config,
                                 Object... arguments)
                          throws DMLRuntimeException
        Setups the kernel parameters and launches the kernel using cuLaunchKernel API. This function currently supports two dimensional grid and blocks.
        Parameters:
        name - name of the kernel
        config - execution configuration
        arguments - can be of type Pointer, long, double, float and int
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs

Copyright © 2017 The Apache Software Foundation. All rights reserved.