Description
Description of the problem
Currently the code base has mixed up CUDA kernels with C++ class and the API is too confusing. Some changes are to be made summarised in the following points,
-
Remove
fill
method from bothMatrix
andVector
classes - The first phase of refactoring should include removingfill
method from both of these classes and their GPU counter parts and shifting it tooperations
module. This will avoid kernel calls inside class methods and the APIs forMatrix
andVector
will be unambiguous. -
Shift
product
andmultiply
functions tooperations
module - The reason for doing this are similar to the above. -
Discuss API for using streams i.e., working on Using non-default streams in CUDA #2. Currently, methods like,
Vector.fill
decipher from theblock_size
whether to use GPU or not. Instead separate functions should be used for GPU and CPU with clean APIs.