-
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
[clang-format] Reformat due to transition from v9.0.0 to v19.1.0 and update of style configuration #594
[clang-format] Reformat due to transition from v9.0.0 to v19.1.0 and update of style configuration #594
Conversation
The diff looks good to me overall.
Maybe this will be enough to fix the issue. If not we could maybe add the configuration |
I agree with @Rbiessy that we should try to improve the configuration file rather than using |
f815a69
to
eb1f931
Compare
eb1f931
to
37a4562
Compare
It looks like this is just how queue
.submit([&](sycl::handler& cgh) {
// body
});
})
.wait(); I didn't find an option for this unfortunately. One workaround is to write The style configuration file is updated in the commit ff81d95. Most changes and clean-up are straightforward. However, one significant change is
Because the alignment style is according to the preferences found in the file, the current code base has both left and right alignments, for example, |
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.
The changes look good to me, thanks.
I much prefer the left alignment of pointers and reference!
I don't mind too much about the queue.[...].wait()
pattern. As you said we can split these lines if needed later.
I didn't mean to approve on behalf of the other teams, I don't know of way to change this in GitHub so I have just requested for their approval again! |
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 doing this.
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.
Thank you for all your work here, @dnhsieh-intel !
This is wonderful - looking forward to the upcoming CI enablement as well!
@@ -114,42 +114,37 @@ int main(int argc, char** argv) { | |||
unique_devices.insert(dev.get_info<sycl::info::device::name>()); | |||
#if !defined(ONEMKL_ENABLE_MKLCPU_BACKEND) && \ | |||
!defined(ONEMKL_ENABLE_PORTBLAS_BACKEND_INTEL_CPU) && \ | |||
!defined(ONEMKL_ENABLE_PORTFFT_BACKEND) && \ | |||
!defined(ONEMKL_ENABLE_NETLIB_BACKEND) | |||
!defined(ONEMKL_ENABLE_PORTFFT_BACKEND) && !defined(ONEMKL_ENABLE_NETLIB_BACKEND) |
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 have a slight preference for the previous way this was formatted (each clause on its own line), but I don't think we have too many places where this happens, and it's still understandable.
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 (almost) each clause on its own line was introduced in PR #571, and we haven't fixed its formatting. Actually clang-format-9
and the old style file would give the same result.
@oneapi-src/onemkl-rng-write, @oneapi-src/onemkl-sparse-write, @oneapi-src/onemkl-dft-write I plan to merge the PR on 10/22 EOD Pacific time if there are no objections. |
@@ -94,9 +94,12 @@ int DFT_Test<precision, domain>::test_in_place_buffer() { | |||
auto acc_host = inout_buf.get_host_access(); | |||
auto ptr_host = reinterpret_cast<FwdOutputType*>(acc_host.get_pointer()); | |||
for (std::int64_t i = 0; i < batches; i++) { | |||
EXPECT_TRUE(check_equal_strided<domain == oneapi::mkl::dft::domain::REAL>( |
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.
Looks good to me, this is the only point that I prefer the old syntax as it's slightly more readable, but as these are unit test its fine.
Thank you for this effort.
Description
This PR is a preparation step for issue #580. Since we will move from
clang-format
v9.0.0 to v19.1.0, this PR reformats the code according to v19.1.0. This PR is separated from the CI enabling (PR #595) in order to have a more informative git blame.There are some changes I want to discuss.
src/lapack/backends/cusolver/cusolver_lapack.cpp
The following changes are suggested by
clang-format
:// clang-format off/on
for all the similar suggestions in this file.tests/unit_tests/dft/include/{compute_out_of_place,compute_inplace}.hpp
Although I don't like the following formatting personally, it is probably still fine. I can turn the formatting off if there are objections.
Checklist
All Submissions