-
-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
This also includes some high-level type wrapping too so you can just add tensors and stuff. We can integrate stuff like |
Great! I'll have a closer look as soon as I have some time. |
src/tensor/libcutensor_types.jl
Outdated
const cutensorContext = Cvoid | ||
const cutensorHandle_t = Ptr{cutensorContext} | ||
|
||
const cudaDataType_t = UInt32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/tensor/wrappers.jl
Outdated
@@ -0,0 +1,315 @@ | |||
using CUDAdrv: CuDefaultStream, CuStream, CuStream_t | |||
|
|||
function cudaDataType(T::DataType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would make sense to move into CUDAapi too, as it's probably used by CUBLAS too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't using it in CUBLAS yet because we don't have tests or anything for mixed precision gemm
Looks like we've been doing a bit of double work. Anyway, great. I won't have much time until the semester is over (three more weeks), so it's good to see this being done. I guess it wouldn't then cost too much time finalize and release my CuTensorOperations.jl package which builds on top of CuTensor and TensorOperations.jl. |
FYI, this is based on the latest versions of maleadt/CUTENSOR.jl and Jutho/CuTensor.jl. |
Ah; ok. I didn't look at it in detail, so I did indeed not appreciate that :-). |
However, cutensor has undergone some changes since then, and I haven't had time to update the Julia wrappers. I think it's mostly the contraction routine, which now accepts a work buffer as argument. @springer13 can comment. |
Pushed some fixed, but can't seem to get this to work (CUDA and CUBLAS errors).
@kshyatt which versions did you use? I'm testing CUTENSOR 0.1.10 with CUDA 10.1. |
Updated to CUTENSOR 0.1.14 on CUDA 10.1, same error:
|
I will look at this as soon as I finished reading your thesis (almost done) :-). |
Hi all, sorry for being late to this conversation (need to update my mail address). It is great to see all this progress. |
Yes. I assumed that the
No, since we don't use the header, we just call directly into the library so we need to be able to query for that kind of information. |
Okay thanks, I'll put this on my TODO list. We should include this as part of our next minor release. |
I have everything running (after some upgrade trouble of the CUDA toolkit). Only the I don't see an immediate problem with the function definitions though, it seems the B array is passed along correctly. Of course, even when the above is fixed, there need to be many more tests (different eltypes etc). I'll make some time this this week. |
Yes, more tests! I can help with that too, I wanted to get some barebones
in to make sure I wrote the wrappers properly in the first place.
…On Mon, May 20, 2019 at 4:53 AM Jutho ***@***.***> wrote:
I have everything running (after some upgrade trouble of the CUDA
toolkit). Only the elementwiseTrinary test fails. Not sure what is going
on there, just in the case of simple matrices and with A and C nonzero and
B zero, it yields the correct result for D = A + B + C, but with B
non-zero, a different result is obtained. With only B nonzero, and A and C
zero, D contains entries of the order 10^{-25} (in Float32).
I don't see an immediate problem with the function definitions though, it
seems the B array is passed along correctly.
Of course, even when the above is fixed, there need to be many more tests
(different eltypes etc). I'll make some time this this week.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#330?email_source=notifications&email_token=AAGKJYYI7YJO3CR5L23JJ33PWJRIBA5CNFSM4HJEOCW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVYEKLA#issuecomment-493897004>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGKJY24GVJD66L25FJJNITPWJRIBANCNFSM4HJEOCWQ>
.
|
Added some more test types and commented out (for now) the weird trinary fail. I'll try to add in combining integer and float types in addition etc. |
That's great. I think that in my earlier explorations with the cutensor library, I never tested or even used/wrapped the tirnary function. Could it be that there is really an error in the implementation in the CUTENSOR library itself, @springer13 ? |
And we have CI! Which fails though, error 18 (unknown CUDA error) with CuArrays.jl and error 20 (insufficient driver version) when running the CUDA C samples. Even though I do have 418.xx and CUDA 10.1... @springer13 ?
CUTENSOR 0.1.14 |
EDIT: I'm stupid, using the wrong Docker runtime. @springer13 it might be useful if it would throw a better error if CUDA isn't available though 🙂
|
@kshyatt , did you also observe that the |
I've updated the @springer13 , so far, I've seen errors in I've also changed |
Looks like CI is working! The failures are unrelated, and have started occurring after upgrading CUDA for this PR. I'll look into that. |
@Jutho What type of errors? I'd say that a NOT_SUPPORTED status would be expected since we have not instantiate all different data type combinations (for instance, sqrt of complex is not supported). |
* print "not_supported" error * support host memory arrays * fix how scalars are treated * fix passing of beta in `cutensorElementwiseTrinary` * assert compatibility of `D` and `C`
I have removed the Libdl fiddling, it didn't seem necessary on my system. Maybe something has changed with the cutensor build process? Either way, @Jutho, you originally added that, care to see if it still works on your system? Besides that, this should be good to go I think. |
CI looks good, let's merge this! |
You'll need to put
libcutensor.so
in a reasonable place. I ran all these tests separately but we should check they actually work integrated into CuArrays too.