Conversation
|
Just noting here that the trace operator doesn't work on GPU's as cupy's einsum doesn't take an out argument. A similar fix to dot product (commit fb9b3d6) fixes things. |
|
Interpolate doesn't currently work either, with error |
trace is fixed as of [6e32312] . If arg0 is a python int, and arg1 is np.float32, this function returns np.float64, leading to the error. This error is unavoidable, since subtract invokes a multiplication by the int (-1). For example f-g will do f + ( (-1)*g). I am not sure what the best fix is. I've tried which fixes things, i.e. use arg0 rather than type(arg0). This gives np.float32 which is correct behaviour here. I wanted to check this is a good fix before pushing. |
|
We may want to use cupy's jit-rawkernel approach to handle type generality: https://docs.cupy.dev/en/stable/user_guide/kernel.html#jit-kernel-definition |
This seems to work for here |
|
I've changed the Chebyshev transform default from the cupy DCT to matrix transforms for now, since even up to sizes of 1024 that seems much much faster. The cupy transform seems quite slow for some reason in my tests. Note there is no CUDA-native DCT, so cupy implements the DCT as an extended FFT. |
…ke a new buff and recompute the analysis.
|
The cylinder calculus tests were failing because the distributor was created without specifying the dtype. Then in operators the matrices were cast to the default type of None. I've pushed a quick fix, but may want to do something better to catch this in future. |
|
Hmm maybe we should just make float64 the default dtype in dist. |
|
I think we need to be more careful how operators are cast. The reason to cast the matrices was to go from double precision to single precision (for real and complex). They are always created in double, I used dist.dtype to get them to single, but this doesn't work if the dtype here doesn't match the bases. |
This PR adds GPU support for one dimensional bases and cartesian problems. Remaining rough edges include good defaults for subproblem coupling, and raising or warning for unsupported features (GPU+MPI, GPU+curvilinear).