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

KOKKOS_TOOLS_LIBS and kp_add_example for Kernel Filter #202

Merged
merged 7 commits into from
Sep 6, 2023

Conversation

vlkale
Copy link
Contributor

@vlkale vlkale commented Aug 24, 2023

Kernel filter is used for nvtx_focused_connector and other tools. It is outdated given changes in user interface and cmake build systems.
This PR is associated with #176 .

This PR does the following:

  • Read the environment KOKKOS_TOOLS_LIBS in addition to KOKKOS_PROFILE_LIBRARY.
  • Use kp_add_example for Kernel Filter

@vlkale vlkale requested a review from crtrott August 24, 2023 21:20
@vlkale vlkale marked this pull request as ready for review August 24, 2023 21:23
Comment on lines 132 to 134
printf(
"Checking KOKKOS_PROFILE_LIBRARY. WARNING: This is a deprecated "
"variable. Please use KOKKOS_TOOLS_LIBS.\n");
Copy link
Member

Choose a reason for hiding this comment

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

Why emit this warning if KOKKOS_PROFILE_LIBRARY was not actually set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, agreed - this is not a great warning text. It was copied and pasted from another library (nvtx-connector). The text after "WARNING: .." should be printed only in the case that KOKKOS_PROFILE_LIBRARY was set. I will change.

Emit KOKKOS_PROFILE_LIBRARY environment variable warning print only if not set rather than printing whenever KOKKOS_TOOLS_LIBS is not found.
@@ -182,7 +196,7 @@ extern "C" void kokkosp_init_library(const int loadSeq,

printf("============================================================\n");
}
}
} // end kokkosp_init_library
Copy link
Member

Choose a reason for hiding this comment

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

I don't really the point of marking the closing brace here.

printf("KokkosP: Found that KOKKOS_PROFILE_LIBRARY is set and it will be used.\n");
printf("KokkosP: Note that KOKKOS_PROFILE_LIBRARY is a deprecated variable. "
"Please use KOKKOS_TOOLS_LIBS in the future.\n");
} // end check for backward compatability
Copy link
Member

Choose a reason for hiding this comment

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

Typo compat(i)bility. I don't see the point of the comment. It is not even the right place. You are missing a cling brace I don;'t even think this compiles

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I messed it up (in the process of trying to put that comment). See updated version .

@vlkale vlkale marked this pull request as draft August 24, 2023 22:52
@vlkale
Copy link
Contributor Author

vlkale commented Aug 24, 2023

Note that this PR doesn't use the namespace for KokkosTools and Filter and kp_kernel_filter.cpp has functions with extern "C" . This will be fixed in a separate PR.

@vlkale vlkale marked this pull request as ready for review August 24, 2023 23:37
@crtrott crtrott merged commit 2724638 into develop Sep 6, 2023
10 checks passed
@dalg24 dalg24 deleted the tlibInFilter branch January 29, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants