-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using odlcuda #23
Comments
Very interesting observation. With that said, you should as a user never explicitly import
This is not supposed to work, and the error message is quite explicit on why. The solution is to simply cast it to an integer yourself
This is actually covered in the readme, and the recommended solution is to change |
If I run |
Here is now my example with timings. I hope this motivates you and shows that you are doing an incredible job!
It looks I can finally run my code on the real PET data :D |
To then use CUDA for everything I do, I need to rewrite some functionals that I wrote in ODL. This causes me some trouble.
results in
I kind of see what I am doing wrong, but not how to resolve this. Any ideas? |
Basically the problem here is that I've not implemented comparison between vectors and longs in odlcuda. The workaround for now is to compare to the zero vector, but if this is a performance hog for you i could get it fixed. |
I thought the problem here is the indexing, as I am indexing with an odl element and not with a "long". If I do your proposed fix, nothing changes. |
Also in the numpy case I am not sure what kind of indexing is necessary and what is not. Does
make any sense to you? |
Now I see what you are aiming at here. Now that would be complicated (mostly given that we don't support advanced indexing). I'd probably try some smooth approximation of the log function if I was you. You could also do something like:
Another option would be for you to manually add whatever function you have as raw cuda, modifying With that said, the primary solution here is frankly to wait for holger to finalize the tensor branch and we'll get a really good backend for this stuff. |
@adler-j, am I correct in assuming that @kohr-h's tensor branch isn't in yet and that the above "problem" still exists? I tried to look into odlcuda a little but could not get my head around it. Is it possible to just get a pointer to the data on the gpu device so that one could use any gpu code without needing to understand your structures in odlcuda? |
I think I found the answer to my question in |
I would like to consult something(Please excuse me for not being good at English) , after I installed according to the official document:(https://odlgroup.github.io/odl/getting_started/installing_extensions.html) , the CPU version can work well, but CUDA can not, please help to analyze it, the installation process is as follows: |
@wangshuaikun did you install it? |
This is kind of a continuation of issue odlgroup/odl#1074.
A few observations:
I can import odlcuda. The import also works without
_install_location = __file__
but in the following I left it in.The order matters. I first tried
which causes odl not to know 'cuda' but
works!
and failed.
error:
Any idea what is wrong here?
The text was updated successfully, but these errors were encountered: