diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index 8cfd5dd9f4..9170e3d126 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -106,6 +106,8 @@ jobs: -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl;videodecode;jpegdecode" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} + -- + -LE "transpose|rccl|videodecode|jpegdecode|network" - name: Install timeout-minutes: 10 diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index 505fcb3a01..4f446c1ee9 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -123,7 +123,7 @@ jobs: -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -- - -LE "transpose|rccl|videodecode|jpegdecode" + -LE "transpose|rccl|videodecode|jpegdecode|network" - name: Install timeout-minutes: 10 diff --git a/.github/workflows/ubuntu-focal.yml b/.github/workflows/ubuntu-focal.yml index 1e3b81ef0f..8bd8ea8402 100644 --- a/.github/workflows/ubuntu-focal.yml +++ b/.github/workflows/ubuntu-focal.yml @@ -162,6 +162,8 @@ jobs: -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl;videodecode;jpegdecode" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -DMPI_HEADERS_ALLOW_MPICH=OFF + -- + -LE "transpose|rccl|videodecode|jpegdecode|network" - name: Test Build-Tree Module timeout-minutes: 45 @@ -250,7 +252,7 @@ jobs: rocm-version: ['6.3'] mpi-headers: ['OFF'] build-jobs: ['3'] - ctest-exclude: ['-LE "transpose|videodecode|jpegdecode"'] + ctest-exclude: ['-LE "transpose|videodecode|jpegdecode|network"'] env: BUILD_TYPE: MinSizeRel @@ -465,3 +467,5 @@ jobs: -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl;videodecode;jpegdecode" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} + -- + -LE "transpose|rccl|videodecode|jpegdecode|network" diff --git a/.github/workflows/ubuntu-jammy.yml b/.github/workflows/ubuntu-jammy.yml index 8eaa559137..a0365fb534 100644 --- a/.github/workflows/ubuntu-jammy.yml +++ b/.github/workflows/ubuntu-jammy.yml @@ -192,7 +192,7 @@ jobs: -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -DUSE_CLANG_OMP=OFF -- - -LE "transpose|rccl|videodecode|jpegdecode" + -LE "transpose|rccl|videodecode|jpegdecode|network" - name: Install timeout-minutes: 10 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 458b251842..f0e570b6f3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,5 +24,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-annotate-tests.cmake) include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-causal-tests.cmake) include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-python-tests.cmake) include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-decode-tests.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-nic-perf.cmake) add_subdirectory(source) diff --git a/tests/rocprof-sys-nic-perf.cmake b/tests/rocprof-sys-nic-perf.cmake new file mode 100644 index 0000000000..b3eaaeca08 --- /dev/null +++ b/tests/rocprof-sys-nic-perf.cmake @@ -0,0 +1,63 @@ +# -------------------------------------------------------------------------------------- # +# +# NIC performance tests +# +# -------------------------------------------------------------------------------------- # + +set(_network_interface "lo") +set(_nic_perf_environment + "${_base_environment}" + "ROCPROFSYS_OUTPUT_PATH=${PROJECT_BINARY_DIR}/rocprof-sys-tests-output/nic-performance" + "ROCPROFSYS_USE_PID=OFF" + "ROCPROFSYS_VERBOSE=1" + "ROCPROFSYS_USE_PROCESS_SAMPLING=OFF" + "ROCPROFSYS_SAMPLING_FREQ=50" + "ROCPROFSYS_SAMPLING_CPUS=none" + "ROCPROFSYS_USE_ROCM=OFF" + "ROCPROFSYS_TIMEMORY_COMPONENTS=wall_clock,papi_array,network_stats" + "ROCPROFSYS_NETWORK_INTERFACE=${_network_interface}" + "ROCPROFSYS_PAPI_EVENTS=net:::${_network_interface}:tx:byte,net:::${_network_interface}:rx:byte,net:::${_network_interface}:rx:packet,net:::${_network_interface}:tx:packet" + ) + +set(_download_url + "https://github.com/ROCm/rocprofiler-systems/releases/download/rocm-6.3.1/rocprofiler-systems-0.1.0-ubuntu-20.04-ROCm-60200-PAPI-OMPT-Python3.sh" + ) + +# Run the NIC performance test +add_test( + NAME nic-performance + COMMAND $ -- wget --no-check-certificate + --quiet ${_download_url} -O /tmp/rocprofiler-systems-install.sh + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) + +set_tests_properties(nic-performance PROPERTIES ENVIRONMENT "${_nic_perf_environment}" + TIMEOUT 120 LABELS "network") + +# Validate the perfetto file generated from NIC performance test output +add_test( + NAME validate-nic-performance-perfetto + COMMAND + ${ROCPROFSYS_VALIDATION_PYTHON} + ${CMAKE_CURRENT_LIST_DIR}/validate-perfetto-proto.py -i + ${PROJECT_BINARY_DIR}/rocprof-sys-tests-output/nic-performance/perfetto-trace.proto + --counter-names rx:byte rx:packet tx:byte tx:packet -t + /opt/trace_processor/bin/trace_processor_shell -p + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) + +set(_test_pass_regex + "rocprof-sys-tests-output/nic-performance/perfetto-trace.proto validated") +set(_test_fail_regex + "Failure validating rocprof-sys-tests-output/nic-performance/perfetto-trace.proto") + +set_tests_properties( + validate-nic-performance-perfetto + PROPERTIES TIMEOUT + 30 + LABELS + "network" + DEPENDS + nic-performance + PASS_REGULAR_EXPRESSION + ${_test_pass_regex} + FAIL_REGULAR_EXPRESSION + ${_test_fail_regex})