Skip to content

Figure out a way to unify CPU and GPU codes. #112

Description

@mmelnich

@rileyjmurray let me try to understand your vision on how this is to be done.
When we consider the differences of a given RandLAPACK driver implementation on CPU and GPU, we need to figure out what to do with:

  1. Allocations/deallocations - these largely take place in the same parts of code.
  2. Synchronizations & the difference in runtime breakdown logging - this is taken care of by simply using if-statements.
  3. Basic difference in CPU and GPU versions of blaspp and some simple lapackpp functions - these only differ in the use of queues.
  4. Difference in CPU and GPU versions of (most) lapackpp functions - functions such as geqrf require an additional call before execution that takes care of allocating workspace on GPU.
  5. Difference in "custom kernels" - certain operations that are simply included as part of the main body of the CPU driver are abstracted away to the rl_cuda_kernels.cu in a GPU implementations.
  6. LAPACK-level functions that are not wrapped via lapackpp - in a GPU implementation, these are called directly through cusolver, and require an additional call before execution that takes care of allocating workspace.

Considering all of the above, it seems that in order to have a unified CPU-GPU driver file, we'll need to abstract out a lot of stuff from the driver file into a computational routine file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions