-
Notifications
You must be signed in to change notification settings - Fork 166
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
[DFT] Initial DFT work & MKLGPU backend #259
[DFT] Initial DFT work & MKLGPU backend #259
Conversation
This commit contains @anantsrivastava30 work from, with additional alterations: |
Please correct me if I am wrong but I don't thing this is the correct git practice, we need to make sure the work is rebased on top of others' commits because this masks the work done by previous authors and as github keeps track of the credit we should make sure thats held intact. |
I've credited you and Tadej as co-authors in both the commit message (with From a review perspective, I think it is best that your work is included in this PR - I had to make quite a few changes to your code. For example, the descriptor class had to be moved from the If you'd like me to separate out your work within this PR I can of course do that. However, as I said, I'd expect the commits to be squashed on merging. EDIT: It appears that I needed to put |
examples/dft/compile_time_dispatching/complex_fwd_buffer_mklgpu.cpp
Outdated
Show resolved
Hide resolved
examples/dft/compile_time_dispatching/complex_fwd_buffer_mklgpu.cpp
Outdated
Show resolved
Hide resolved
A quick high-level comment on the organization of this PR and #261. I am not in favor of adding a backend with no actual tests to cover it. Can we either add the tests first (they won't be used until we add the backend, but that is ok) or add the backend and tests in the same PR with proper testing? (with attached tests logs in the PR) Also, unless I missed it, I don't see any changes to README and other documentation regarding the addition of new backend (along with supported compilers, OS, hardware, etc). Could you please update them as needed? |
I've added that MKLGPU is supported in the main README in 6307446. I very much agree that this should be tested before merging. I think that this PR is already large enough, and that for the purpose review, it would be better to have feedback on the work in the tests PR and this PR separately. I think it would be best if the tests were merged first, and this PR rebased to include them. |
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.
Thanks for the PR! I have several questions below to these changes.
* Implements DFT common functionality * Implements MKLGPU backend * Tested against adapted examples from closed-source MKLGPU library and prototype unit tests (to be submitted in another PR). Co-authored-by: Anant Srivastava <[email protected]> Co-authored-by: Tadej Ciglaric <[email protected]>
* It may be desireable to link to only libonemkl_dft_mklgpu without the need to also link to libonemkl_dft. * To allow this, the OneMKL interface must be duplicated within the backend library. * This PR duplicates the interface, allowing direct linking.
Now that #261 is merged, it would be good to see the test logs in this PR. |
There is no reason to believe it wouldn't work, but it has not been tested.
Here are the logs: Note that I ran this with the OpenCL runtime as this is currently easier on my development machine. I am commenting out this skip here. |
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.
Approving, given the md test PR #275 passes with these as well
@mmeterel and @mkrainiuk this PR looks good on the DFT side. Do you have any concerns left regarding how this fit to the overall design of the project? |
the MKLCPU backend wasn't building, so I've fixed that. Here is the new log: |
set_value_item(descHandle, DFTI_INPUT_DISTANCE, config.fwd_dist); | ||
set_value_item(descHandle, DFTI_OUTPUT_DISTANCE, config.bwd_dist); |
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.
@anantsrivastava30, @t4c1, @Rbiessy, @hjabird @lhuot: I know this PR was merged already but what motivated this usage of DFTI_INPUT_DISTANCE
and DFTI_OUTUT_DISTANCE
via dpc++ APIs? Those parameters are not listed in the specs and we explicitly recommend to use FWD_DISTANCE
and BWD_DISTANCE
for the usage of the closed-source oneMKL via DPC++ APIs here.
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.
Hey @raphael-egan the usage of these are mostly to conform to the classical API usage, that still uses these parameters, however I see you point and we can mask them in the cpu backend pr#288, so that on the user end we still use fwd/bwd distance and later on in this part of the code change these to input/output distance, lets move this discussion to #288
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.
Yes, it makes sense to move to the C++ API in the CPU MR. The initial work used the C API for the CPU backend and we didn't update this to avoid conflicts. Thanks.
Co-authored-by @t4c1 and @anantsrivastava30.
Description
Checklist
All Submissions
New interfaces