-
Notifications
You must be signed in to change notification settings - Fork 41
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
rocFFT and hipFFT examples (part II) #160
base: develop
Are you sure you want to change the base?
Conversation
Common/example_utils.hpp
Outdated
void print_nd_data(const std::vector<Tdata> data, | ||
std::vector<Tsize> np, | ||
const int column_width = 4, | ||
const bool reverse_indexing = false) |
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.
I think this would be easier to understand and use if it was either renamed to row_major
(since the deffault looks like column-major), or if this was replaced by an enum that spelled out exactly what the caller wanted.
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.
Hm yes, this was added to support printing data with either layout. IINM the default is row-major (np[0]
is assumed to be the size of the outermost dimension), and when reversing the ordering of the dimension sizes we assume a column-major layout. Changed this parameter to column_major
.
I'm having some trouble getting the example to work with the cuda backend; cmake issues show up. |
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.
cuda compilation doesn't seem to work. CI coverage is probably needed here.
@malcolmroberts what errors are you getting? On our end (internal CI, and I also built it locally to double-check) it builds without problems |
c08fc9f
to
b88aa6e
Compare
Common/example_utils.hpp
Outdated
/// layout, the \p column_major parameter must be set to \p true for a correct interpretation | ||
/// of the dimensions' sizes. | ||
template<class Tdata, class Tsize> | ||
void print_nd_data(const std::vector<Tdata> data, |
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.
data
should be a const reference?
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.
Could be, yes. Updated this!
f0b29b0
to
a7478f1
Compare
a7478f1
to
24d38bd
Compare
@malcolmroberts @evetsso what's the status of the review for this? I think the only issues left to tackle were the ones mentioned in this comment about the CUDA build, but this is not showing up on our end so without further details I cannot move forward on that |
Sorry for the delay - jumping back into this again. When I configure with
|
@malcolmroberts Oh I see, but IINM that error should be happening for other samples because it seems the HIP headers are not found. I can reproduce this on my side if for instance I rename the |
Hey, @Beanavil ; I do have /opt/rocm/include/hip populated on my test machine. However, if there isn't a |
@Beanavil Just to be totally clear here, are you also building these examples under CUDA? |
@evetsso @malcolmroberts sorry for the delayed response, I got totally caught up on other tasks. Yes, we build the examples for CUDA and HIP backend. In fact, we use the dockerfiles provided by this repo for this, so I think if you use a container built from the cuda image the build should be successful. I'm trying to figure out what could be triggering the failures in your end, I don't think a developer@2c1b9a595f95:~/rocm-examples/Libraries/hipFFT/build$ cmake --build . -v
...
[ 16%] Building CUDA object multi_gpu/CMakeFiles/hipfft_multi_gpu.dir/main.cpp.o
cd /home/developer/rocm-examples/Libraries/hipFFT/build/multi_gpu && /usr/local/cuda/bin/nvcc
-forward-unknown-to-host-compiler -I/home/developer/rocm-examples/Libraries/hipFFT/multi_gpu/../../../Common
+ -isystem=/opt/rocm/include --generate-code=arch=compute_52,code=[compute_52,sm_52] -std=c++17 -MD -MT
multi_gpu/CMakeFiles/hipfft_multi_gpu.dir/main.cpp.o -MF CMakeFiles/hipfft_multi_gpu.dir/main.cpp.o.d -x cu
-c /home/developer/rocm-examples/Libraries/hipFFT/multi_gpu/main.cpp -o CMakeFiles/hipfft_multi_gpu.dir/main.cpp.o
... Could you also show how is the compiler being run on your end? This is done with the |
This pull request contains the second batch of the new rocFFT and hipFFT examples. Added samples:
complex_complex
complex_real
real_complex
multi_gpu