CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
79 lines
2.1 KiB
C++
79 lines
2.1 KiB
C++
/*
|
|
* Copyright © Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
#ifndef ROCRTST_SUITES_PERFORMANCE_AGENT_PRELOAD_H_
|
|
#define ROCRTST_SUITES_PERFORMANCE_AGENT_PRELOAD_H_
|
|
|
|
#include <vector>
|
|
|
|
#include "suites/test_common/test_base.h"
|
|
#include "common/base_rocr.h"
|
|
#include "common/common.h"
|
|
#include "hsa/hsa.h"
|
|
#include "hsa/hsa_ext_amd.h"
|
|
|
|
class AgentPreloadTest : public TestBase {
|
|
public:
|
|
// @Brief: Constructor
|
|
AgentPreloadTest();
|
|
|
|
// @Brief: Destructor
|
|
virtual ~AgentPreloadTest(void);
|
|
|
|
// @Brief: Set up the environment for the test
|
|
virtual void SetUp(void);
|
|
|
|
// @Brief: Run the test case
|
|
virtual void Run(void);
|
|
|
|
// @Brief: Display results
|
|
virtual void DisplayResults(void) const;
|
|
|
|
// @Brief: Display information about what this test does
|
|
virtual void DisplayTestInfo(void);
|
|
|
|
// @Brief: Clean up and close the runtime
|
|
virtual void Close(void);
|
|
|
|
private:
|
|
// @Brief: Measure profiling enable latency without preload
|
|
double MeasureProfilingEnableLatencyWithoutPreload();
|
|
|
|
// @Brief: Measure profiling enable latency with preload
|
|
double MeasureProfilingEnableLatencyWithPreload();
|
|
|
|
// @Brief: Measure first async copy latency without blit preload
|
|
double MeasureFirstAsyncCopyLatencyWithoutPreload();
|
|
|
|
// @Brief: Measure first async copy latency with blit preload
|
|
double MeasureFirstAsyncCopyLatencyWithPreload();
|
|
|
|
// GPU agents to test
|
|
std::vector<hsa_agent_t> gpu_agents_;
|
|
|
|
// CPU agents for profiling enable
|
|
std::vector<hsa_agent_t> cpu_agents_;
|
|
|
|
// Latency without preload (microseconds)
|
|
double latency_without_preload_us_;
|
|
|
|
// Latency with preload (microseconds)
|
|
double latency_with_preload_us_;
|
|
|
|
// Latency improvement (microseconds)
|
|
double latency_improvement_us_;
|
|
|
|
// Blit copy latency without preload (microseconds)
|
|
double blit_latency_without_preload_us_;
|
|
|
|
// Blit copy latency with preload (microseconds)
|
|
double blit_latency_with_preload_us_;
|
|
|
|
// Blit latency improvement (microseconds)
|
|
double blit_latency_improvement_us_;
|
|
};
|
|
|
|
#endif // ROCRTST_SUITES_PERFORMANCE_AGENT_PRELOAD_H_
|