kokkos / kokkos-tools

Kokkos C++ Performance Portability Programming Ecosystem: Profiling and Debugging Tools
Other
109 stars 55 forks source link

Variorium Connector: kernel granularity and JSON #265

Open twilk10 opened 2 months ago

twilk10 commented 2 months ago

Updates to the current connector with updates such as json updates, energy estimation, device information. It has also been altered to get power information at the kernel level.

masterleinad commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

masterleinad commented 2 months ago

Please use clang-format 8 for the indentation.

vlkale commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1

@twilk10 Thanks for submitting this PR!

To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

twilk10 commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1

@twilk10 Thanks for submitting this PR!

To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

vlkale commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Thanks! Be sure to run clang-format-8 on each code file that you changed in this PR, as @masterleinad mentions in one of his comments. This is a prereq for your PR to be merged. Note that this is the CI check that doesn't pass.

twilk10 commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Thanks! Be sure to run clang-format-8 on each code file that you changed in this PR, as @masterleinad mentions in one of his comments. This is a prereq for your PR to be merged. Note that this is the CI check that doesn't pass.

I ran clang-format 8 on it I will have to evaluate what went wrong and try it again.

vlkale commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Thanks! Be sure to run clang-format-8 on each code file that you changed in this PR, as @masterleinad mentions in one of his comments. This is a prereq for your PR to be merged. Note that this is the CI check that doesn't pass.

I ran clang-format 8 on it I will have to evaluate what went wrong and try it again.

@twilk10 OK. You want to do something like:

clang-format-8 -style=file --assume-filename=../../.clang-format ../../profiling/variorium-connector/kp_variorium_connector.cpp > ../../profiling/variorium-connector/kp_variorium_connector-temp.cpp

You can diff in between to see whether and/or how the file has indeed changed and then mv the temporary file to the original file.

If that doesn't work, can you send the error output with the flag -Werror ?

vlkale commented 2 months ago

@twilk10 Can you look at @masterleinad 's comments particularly on printing output and parsing json with jansson? I think they are good suggestions and maybe you can commit those before committing other changes with clang-format.

Also, make sure to note to not include any unneeded headers.

twilk10 commented 2 months ago

@twilk10 Can you look at @masterleinad 's comments particularly on printing output and parsing json with jansson? I think they are good suggestions and maybe you can commit those before committing other changes with clang-format.

Also, make sure to note to not include any unneeded headers.

I will take a look and try updating withthe help of these suggestions.

twilk10 commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Thanks! Be sure to run clang-format-8 on each code file that you changed in this PR, as @masterleinad mentions in one of his comments. This is a prereq for your PR to be merged. Note that this is the CI check that doesn't pass.

I ran clang-format 8 on it I will have to evaluate what went wrong and try it again.

@twilk10 OK. You want to do something like:

clang-format-8 -style=file --assume-filename=../../.clang-format ../../profiling/variorium-connector/kp_variorium_connector.cpp > ../../profiling/variorium-connector/kp_variorium_connector-temp.cpp

You can diff in between to see whether and/or how the file has indeed changed and then mv the temporary file to the original file.

If that doesn't work, can you send the error output with the flag -Werror ?

I am having trouble getting access to clang-format-8 but I can get other versions.

twilk10 commented 2 months ago

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Please explain the behavior of the connector tool including options. What is the minimum variorum version required? We should check for that when trying to find Variorum via CMake.

+1 @twilk10 Thanks for submitting this PR! To provide an explanation of this connector tool’s options and a high-level behavior from the Kokkos user perspective: maybe you can add kokkosp_print_help() (like what is in space-time-stack).

Thank you I will work on getting that information up as soon as possible.

Thanks! Be sure to run clang-format-8 on each code file that you changed in this PR, as @masterleinad mentions in one of his comments. This is a prereq for your PR to be merged. Note that this is the CI check that doesn't pass.

I ran clang-format 8 on it I will have to evaluate what went wrong and try it again.

@twilk10 OK. You want to do something like: clang-format-8 -style=file --assume-filename=../../.clang-format ../../profiling/variorium-connector/kp_variorium_connector.cpp > ../../profiling/variorium-connector/kp_variorium_connector-temp.cpp You can diff in between to see whether and/or how the file has indeed changed and then mv the temporary file to the original file. If that doesn't work, can you send the error output with the flag -Werror ?

I am having trouble getting access to clang-format-8 but I can get other versions.

I have solved this issue.

vlkale commented 2 months ago

Great! All checks have passed for clang-format-8. Can you address the comments by @masterleinad ? (You can commit suggestions if you agree).

I also updated the title to capture the changes you made in your code better.

@masterleinad Are there any other things to resolve here?

twilk10 commented 2 months ago

Great! All checks have passed for clang-format-8. Can you address the comments by @masterleinad ? (You can commit suggestions if you agree).

I also updated the title to capture the changes you made in your code better.

@masterleinad Are there any other things to resolve here?

I am currently working on updating the connector to address the comments made by @masterleinad

twilk10 commented 2 months ago

This is an update to the Kokkos-tool variorum connector and can be used to get the power data an Tested on incremental HIP test on exascale machine using AMD style architecture. The idea of change is to make this tool usable and change the functionality to retrieve power information at the kernel level as that is a more modern use for the tool. This is a step in the direction of allowing users to measure their energy consumption while using Kokkos. Features to be updated -updated json parsing -updated what is to be printed out Features that were updated in variorum but others -API to get power Features implemented -Equation to estimate energy usage until energy API is updated -Moving the capture of data to the hooks so that the power data being retrieved is from inside the kernel Outputs include device Id device type device kernel and power alongside power estimation Also Outputs to a file that is made on the system. User can provide an environment variable to be used by uncommenting code but if not variorum will make a file for the user to put the information in.

Compatible with variorum version 6.0 Sample output; name: Z4mainEUllRlE_ Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation 2679.104000

Rombur commented 2 months ago

You pushed your build directory. You need to remove it.

masterleinad commented 2 months ago

Sample output; name: Z4mainEUllRlE_ Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation 2679.104000

Please provide output from the incremental tests or so.

twilk10 commented 1 month ago

Current out put with Incremental test

name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 270.228000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 232.134000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 233.646000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 235.074000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 233.436000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 232.008000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 234.276000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 231.882000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 232.050000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 232.176000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 231.462000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 233.394000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 234.108000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 234.528000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 231.840000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 231.462000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 231.378000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 233.520000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 233.646000
name: Reduction Device ID: 0 Instance ID: 1 DeviceType: SERIAL Energy Estimation in Joules 231.042000