Skip to content
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

Running on AMD #156

Open
csccva opened this issue Feb 19, 2024 · 7 comments
Open

Running on AMD #156

csccva opened this issue Feb 19, 2024 · 7 comments

Comments

@csccva
Copy link

csccva commented Feb 19, 2024

Hello,

Are you aware of any attempts to hipify this library on AMD GPUS using HIP?

Cristian

@ahbarnett
Copy link
Collaborator

ahbarnett commented Feb 19, 2024 via email

@csccva
Copy link
Author

csccva commented Feb 19, 2024

I am not, although others have asked. Have a look at Discussions over at FINUFFT GitHub. There are others that may want to help. Best, Alex

On Mon, Feb 19, 2024 at 9:22 AM Cristian-Vasile Achim < @.> wrote: Hello, Are you aware of any attempts to hipify this library on AMD GPUS using HIP? Cristian — Reply to this email directly, view it on GitHub <#156>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSXGN3KNPCN6U7MQHT3YUNN25AVCNFSM6AAAAABDPRV7CGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DENBYGY4TSNQ . You are receiving this because you are subscribed to this thread.Message ID: @.>
-- *-------------------------------------------------------------------^`^._.~' |\ Alex Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

Thank you for your reply. I have to use this on AMD and my only is via hipify. SInce I never used yet the library I need to ask. Is there anything in the library is very specific to CUDA that a port will require a massive rewriting?

Cristian

@ahbarnett
Copy link
Collaborator

ahbarnett commented Feb 19, 2024 via email

@blackwer
Copy link
Member

Melody's code uses shared memory (49kB per thread block),

We should revisit this. This is an old constraint that isn't really present on modern hardware where you can change these limits on the fly. It's been noted before we just haven't really done anything about it.

@blackwer may have opinions about porting, who has worked on the cuda code
most recently.

Porting is straightforward and requires relatively few modifications afaik. It's definitely on my list of "fun" side-projects to tackle. I could probably do it in an afternoon or two once I got a sense for the tooling (famous last words). That said I'm busy with some other projects right now so I don't really want to work on this immediately.

@csccva If you'd like to contribute... #116 would be a good starting point for inspiration. The code there isn't usable directly since the repo has diverged so significantly, but I doubt the requirements for the port have changed much.

Notable differences with the current code that might require some thinking:

  1. considerably less reliance on macros than the version linked
  2. cmake, rather than makefile
  3. python code is more generic than prior -- though i think will probably "just work" without intervention (also famous last words)

@csccva
Copy link
Author

csccva commented Feb 20, 2024

Thank you for reply. I can infer that there are no special cuda features used. I can not dig now the amount of shared memory available per CU (SMP). This document suggests it is 64kb. So quite ok. I can try to give it a try with hipify. We had quite good experience with this and we are trying to see as well some header only porting approach (https://github.com/cschpc/hop)

Last (stupid) question. I got to this project recommended buy someone who used it. Is it possible to use it in C codes or only python?

Cristian

@blackwer
Copy link
Member

I can not dig now the amount of shared memory available per CU (SMP).

Don't worry about this. I'll deal with this later

I can try to give it a try with hipify. We had quite good experience with this and we are trying to see as well some header only porting approach

Great! Please feel free to submit a PR

Last (stupid) question. I got to this project recommended buy someone who used it. Is it possible to use it in C codes or only python?

We provide C/C++ bindings. See: https://github.com/flatironinstitute/finufft/tree/master/examples/cuda

@csccva
Copy link
Author

csccva commented Feb 20, 2024

Thank you for your replies. I will let you know how it goes.

Cristian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants