-
Notifications
You must be signed in to change notification settings - Fork 5
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
[BUG] Matvis does not work with CUDA 12 #90
Comments
Thanks @rlbyrne. The issue with CUDA 11 seems to be an environment issue with your system. It would be good to get |
@steven-murray There is some time pressure, so a workaround sounds better than waiting a few weeks. Any ideas how to resolve the environment issue? |
Hi @rlbyrne . To clarify @steven-murray reply a bit, yes, As for your error, it indeed seem to be a compiling issue coming from The version of the CUDA driver on your system also matter. On an HPC, I have to load the correct version of CUDA driver, usually with the |
@piyanatk I'm trying to install cuda via the The |
@rlbyrne I am not sure about the issue with installing from nvidia channel ... maybe switch to For loading the driver with |
@piyanatk I don't see any cuda packages under |
@rlbyrne Can you check your BTW, are you running |
@rlbyrne. OK. I got it working without the system CUDA installed.
It turns out that if you only install Although not cuda related, @steven-murray We should update the package requirements until we have time to update to CUDA 12. I will make an environment file for GPU installation and put it somewhere, also update the documentation if I can find time. |
Hey @piyanatk, yes that would be much appreciated! There is a PR open for hera_sim to make it compatible with numpy2 and pyuvdata 3, so hopefully it will be merged inside the week. A GPU environment file would be very useful (even if it does go out of date rather fast). |
Ok things are looking promising! I think the job is running. Thank you @piyanatk |
Unfortunately running things with the GPUs didn't speed things up at all. A single time and frequency step for the OVRO-LWA took 140 minutes with the GPU setting and 132 minutes without, so actually slower with the GPU setting. Any idea what's going wrong? |
@rlbyrne Can you please share the command that you use? |
@piyanatk I'm just setting The full call is
|
@rlbyrne I think the bigger question is what is the configuration of your simulation? How many baselines and sky sources/pixels? And also are your beams analytic or UVBeams, and if UVBeams, how many pixels? For some smaller simulations (per time and freq) the overheads are dominant and GPU isn't that useful. |
You could also try running some line-profiling to see what the dominant bottleneck is. You can also check out the |
@rlbyrne I want to also suggest using the wrapper in |
The simulation has 1 time, 1 frequency, 62,128 baselines, and I would estimate 1,572,864 "sources" (pixels in the hemisphere for a Healpix map with nside 512). I do suspect the beam size has some impact. I was previously using a lower resolution beam and things were running faster, although I didn't actually profile the speed. I can try downsampling the beam and hope it doesn't have much impact on the result. Does matvis support any other beam formats that could run faster? Like a Gaussian decomposition? I haven't worked with |
Hmm, the GPU should speed things up with that number of sources and baselines based on my testing. What kind of beam model are you using? Is it an e-field CST beam in a UVBeam file? You can try to specify the order of beam spatial interpolation through the The interface in |
Sorry to be late on this again -- I was on vacation. I agree with @piyanatk that for the simulation size you're using, there should be significant speed up with GPU, so I'm not quite sure what is going on here. Is your beam on a rectilinear alt/az grid or in healpix? I am assuming the former because currently the GPU version of matvis can't handle the latter. Also, if you're using the same beam for each antenna, make sure you specify only one unique beam in the beam list (and use the same beam index for each antenna). For this size of simulation with a single unique beam, I wouldn't expect to the beam interpolation to be the bottleneck, but rather the single big matrix multiplication. This should be much faster on the GPU no matter how you slice it. |
Attempting to run matvis with GPUs using CUDA 12 produces this error:
I've attempted a workaround by installing CUDA 11 with conda but it hasn't worked. The installations I performed were:
conda install -c conda-forge cudatoolkit=11
conda install -c conda-forge pycuda
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
The resulting error traceback is:
The text was updated successfully, but these errors were encountered: