-
Notifications
You must be signed in to change notification settings - Fork 37
Fix CUTLASS local work driver setup #213
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,18 +11,31 @@ | |
| */ | ||
| #include <gauxc/xc_integrator/local_work_driver.hpp> | ||
| #include "host/reference_local_host_work_driver.hpp" | ||
| #include <algorithm> | ||
| #include <cctype> | ||
| #ifdef GAUXC_HAS_DEVICE | ||
| #include "device/cuda/cuda_aos_scheme1.hpp" | ||
| #include "device/hip/hip_aos_scheme1.hpp" | ||
| #endif | ||
|
|
||
| namespace GauXC { | ||
| namespace { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please done use anonymous namespaces. "detail" would be appropriate here. |
||
|
|
||
| void trim_and_uppercase(std::string& name) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is only used once, I don't see the value in adding the helper function. |
||
| auto not_space = [](unsigned char c) { return !std::isspace(c); }; | ||
| name.erase(name.begin(), std::find_if(name.begin(), name.end(), not_space)); | ||
| name.erase(std::find_if(name.rbegin(), name.rend(), not_space).base(), name.end()); | ||
| std::transform(name.begin(), name.end(), name.begin(), | ||
| [](unsigned char c) { return static_cast<char>(std::toupper(c)); }); | ||
| } | ||
|
|
||
| } | ||
|
|
||
| LocalWorkDriverFactory::ptr_return_t | ||
| LocalWorkDriverFactory::make_local_work_driver( ExecutionSpace ex, | ||
| std::string name, LocalWorkSettings settings ) { | ||
|
|
||
| std::transform( name.begin(), name.end(), name.begin(), ::toupper ); | ||
| trim_and_uppercase(name); | ||
| (void)(settings); | ||
|
|
||
| switch(ex) { | ||
|
|
||
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'm fine with this in principle, but can you point to the point where this caused an error for the current bug fix? This applies to the other instance as well.