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

[FEA] AutoTuner warns that non-utf8 may not support some GPU expressions #736

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

amahussein
Copy link
Collaborator

Signed-off-by: Ahmed Hussein (amahussein) [email protected]

Fixes #713, Fixes #734

This PR changes the behavior of the AutoTuner to display a comment when the file-encoding of an application is set to a value that is not "utf-8".

The AutoTuner will generate the folllowing line:

file.encoding should be [UTF-8] because GPU only supports the charset when using some expressions.

The changes also improves the extraction of the RAPIDS jars values.

Changes for 713:

  • Added a new field in ApplicationSummaryInfo that represents the systemProperties
  • Capture SystemProperties in the App in order to be able to check the file-encoding
  • Moved map properties to CacheableProps so that it can be used by the Qualification as well.
  • Moved String-conversion methods from AutTuner to StringUtils
  • Moved getEventFromJsonMethod to EventUtils object
  • Added a new UnitTest for the AutoTuner
  • Updated ApplicationInfoSuite unitTests

Changes for 734:

  • Fixed the implementation of CollectInformation.getRapidsJARInfo

Signed-off-by: Ahmed Hussein (amahussein) <[email protected]>

Fixes NVIDIA#713, Fixes NVIDIA#734

This PR changes the behavior of the AutTuner to display a comment when
the file-encoding of an application is set to a value that is not "utf-8".

The changes also improves the extraction of the RAPIDS jars values.

*Changes for 713*:

- Added a new field in `ApplicationSummaryInfo` that represents the
  systemProperties
- Capture SystemProperties in the App in order to be able to check the
  file-encoding
- Moved map properties to `CacheableProps` so that it can be used by the
  Qualification as well.
- Moved String-conversion methods from AutTuner to StringUtils
- Moved `getEventFromJsonMethod` to EventUtils object
- Added a new UnitTest for the AutoTuner
- Updated ApplicationInfoSuite unitTests

*Changes for 734*:

- Fixed the implementation of `CollectInformation.getRapidsJARInfo`
@amahussein amahussein self-assigned this Jan 22, 2024
@amahussein amahussein added feature request New feature or request core_tools Scope the core module (scala) labels Jan 22, 2024
// No need to capture all the properties in memory. We only capture important ones.
systemProperties ++= event.environmentDetails("System Properties").toMap.filterKeys(
RETAINED_SYSTEM_PROPS.contains(_))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Extra line

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment on lines 756 to 757
case encoding =>
if (!ToolUtils.isFileEncodingRecommended(encoding)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move if condition to case encoding statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

def handleEnvUpdateForCachedProps(event: SparkListenerEnvironmentUpdate): Unit = {
val sparkProperties = event.environmentDetails("Spark Properties").toMap

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Extra line

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Signed-off-by: Ahmed Hussein (amahussein) <[email protected]>
Copy link
Collaborator

@nartal1 nartal1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Just a couple of Nits. Thanks @amahussein for refactoring some of the code!

Signed-off-by: Ahmed Hussein (amahussein) <[email protected]>
@amahussein amahussein merged commit 8340046 into NVIDIA:dev Jan 23, 2024
13 checks passed
@amahussein amahussein deleted the spark-rapids-tools-713 branch January 23, 2024 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core_tools Scope the core module (scala) feature request New feature or request
Projects
None yet
3 participants