Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/projects/hipfile/ @ROCm/hipfile-reviewers
/projects/hipother/ @ROCm/hipother-reviewers
/projects/hip-tests/ @ROCm/hip-tests-reviewers
/projects/hrr/ @ROCm/hrr-reviewers
/projects/rccl/ @ROCm/rccl-reviewers @ROCm/rccl-leads
/projects/rccl/src/include/api_trace.h @ROCm/rccl-reviewers @ROCm/rccl-leads @ROCm/ROCM-DevTools-Team
/projects/rccl/tools/scripts/test_runner/configs/ci-precheckin.json @ROCm/rccl-ci
Expand Down
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
- changed-files:
- any-glob-to-any-file: 'projects/hip-tests/**/*'

"project: hrr":
- changed-files:
- any-glob-to-any-file: 'projects/hrr/**/*'

"project: rccl":
- changed-files:
- any-glob-to-any-file: 'projects/rccl/**/*'
Expand Down
12 changes: 12 additions & 0 deletions .github/scripts/therock_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"projects/amdsmi": "amdsmi", # amdsmi changes run amdsmi + its downstream dependents
"projects/aqlprofile": "profiler",
"projects/clr": "runtimes",
"projects/hrr": "hrr",

"projects/cuid": "rdc",
"projects/hipfile": "storage_libs",
"projects/hip": "runtimes",
Expand Down Expand Up @@ -97,6 +99,16 @@
"cmake_options": ["-DTHEROCK_ENABLE_ALL=ON"],
"projects_to_test": "hip-tests, rocrtst, rocprofiler-sdk, rocr-debug-agent, rocgdb-cpu, rocgdb-gpu, rocgdb-corefile",
},
# HRR changes require a blocking build of the runtime and HRR test binaries,
# but GPU execution is handled separately on datacenter/nightly runners.
"hrr": {
"cmake_options": [
"-DTHEROCK_ENABLE_ALL=OFF",
"-DTHEROCK_ENABLE_CORE=ON",
"-DTHEROCK_BUILD_TESTING=ON",
],
"projects_to_test": "",
},
"all": {
"cmake_options": ["-DTHEROCK_ENABLE_ALL=ON"],
"projects_to_test": "amdsmi, hip-tests, rocrtst, aqlprofile, rocprofiler-compute, rocprofiler-sdk, rocprofiler-systems, rocr-debug-agent, rocgdb-cpu, rocgdb-gpu, rocgdb-corefile",
Expand Down
8 changes: 4 additions & 4 deletions projects/clr/hipamd/src/hrr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ target_sources(amdhip64 PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/hip_capture_generated.cpp
)

# hrr_api_args.h and all capture headers live here.
# Capture headers live here; the shared HRR archive wire format now lives in
# projects/hrr/include and is included as "hrr/hrr_api_args.h".
# Playback tools (hrr-playback, hrr_reader) now live in projects/hrr.
target_include_directories(amdhip64 PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../../../../hrr/include
)

# Playback tools (hrr-playback, hrr_reader/hrr_playback libs)
add_subdirectory(playback)
2 changes: 1 addition & 1 deletion projects/clr/hipamd/src/hrr/hip_capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "hip_capture_writer.h"

// hrr_api_args.h — for hrr_args_* struct types and hrr_api_id_t enum
#include "hrr_api_args.h"
#include "hrr/hrr_api_args.h"

// HIP runtime internals
#include "../hip_global.hpp" // hip::asKernel()
Expand Down
49 changes: 47 additions & 2 deletions projects/clr/hipamd/src/hrr/hip_capture_generated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include "hip_capture.h"
#include "hip_capture_writer.h"

// hrr_api_args.h lives in the same directory (hipamd/src/hrr/)
#include "hrr_api_args.h"
// hrr_api_args.h now lives in projects/hrr/include/hrr (shared wire format)
#include "hrr/hrr_api_args.h"

#include "hip/amd_detail/hip_api_trace.hpp"

Expand Down Expand Up @@ -749,6 +749,20 @@ static hipError_t capture_hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limi
return r;
}

// Generated shim
static hipError_t capture_hipDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, hipDevice_t device) {
hipError_t r = g_real_table.hipDeviceGetLuid_fn(luid, deviceNodeMask, device);
if (r == hipSuccess) {
hrr_args_hipDeviceGetLuid a{};
a.ret = static_cast<int32_t>(r);
a.luid = reinterpret_cast<uint64_t>(luid);
a.deviceNodeMask = reinterpret_cast<uint64_t>(deviceNodeMask);
a.device = static_cast<uint64_t>(static_cast<int>(device));
hrr_cap::writer::write_event_raw(HRR_API_HIPDEVICEGETLUID, &a.hdr, sizeof(a));
}
return r;
}

// Generated shim
static hipError_t capture_hipDeviceGetMemPool(hipMemPool_t* mem_pool, int device) {
hipError_t r = g_real_table.hipDeviceGetMemPool_fn(mem_pool, device);
Expand Down Expand Up @@ -2838,6 +2852,20 @@ static hipError_t capture_hipInit(unsigned int flags) {
return r;
}

// Generated shim
static hipError_t capture_hipInitDevice(int device, unsigned int deviceFlags, unsigned int flags) {
hipError_t r = g_real_table.hipInitDevice_fn(device, deviceFlags, flags);
if (r == hipSuccess) {
hrr_args_hipInitDevice a{};
a.ret = static_cast<int32_t>(r);
a.device = static_cast<decltype(a.device)>(device);
a.deviceFlags = static_cast<decltype(a.deviceFlags)>(deviceFlags);
a.flags = static_cast<decltype(a.flags)>(flags);
hrr_cap::writer::write_event_raw(HRR_API_HIPINITDEVICE, &a.hdr, sizeof(a));
}
return r;
}

// Generated shim
static hipError_t capture_hipIpcCloseMemHandle(void* devPtr) {
hipError_t r = g_real_table.hipIpcCloseMemHandle_fn(devPtr);
Expand Down Expand Up @@ -7392,6 +7420,20 @@ static hipError_t capture_hipExecutionCtxWaitEvent(hipExecutionCtx_t ctx, hipEve
return r;
}

// Generated shim
static hipError_t capture_hipMemGetDefaultMemPool(hipMemPool_t* memPool, hipMemLocation* location, hipMemAllocationType type) {
hipError_t r = g_real_table.hipMemGetDefaultMemPool_fn(memPool, location, type);
if (r == hipSuccess) {
hrr_args_hipMemGetDefaultMemPool a{};
a.ret = static_cast<int32_t>(r);
a.location = 0; // non-castable type skipped
a.type = static_cast<decltype(a.type)>(type);
if (memPool) a.memPool = reinterpret_cast<uint64_t>(*memPool);
hrr_cap::writer::write_event_raw(HRR_API_HIPMEMGETDEFAULTMEMPOOL, &a.hdr, sizeof(a));
}
return r;
}

// ============================================================
// Table builders
// ============================================================
Expand Down Expand Up @@ -7490,6 +7532,7 @@ void hip_capture_build_table() {
g_cap_table.hipDeviceGetDefaultMemPool_fn = capture_hipDeviceGetDefaultMemPool;
g_cap_table.hipDeviceGetGraphMemAttribute_fn = capture_hipDeviceGetGraphMemAttribute;
g_cap_table.hipDeviceGetLimit_fn = capture_hipDeviceGetLimit;
g_cap_table.hipDeviceGetLuid_fn = capture_hipDeviceGetLuid;
g_cap_table.hipDeviceGetMemPool_fn = capture_hipDeviceGetMemPool;
g_cap_table.hipDeviceGetName_fn = capture_hipDeviceGetName;
g_cap_table.hipDeviceGetP2PAttribute_fn = capture_hipDeviceGetP2PAttribute;
Expand Down Expand Up @@ -7646,6 +7689,7 @@ void hip_capture_build_table() {
g_cap_table.hipImportExternalMemory_fn = capture_hipImportExternalMemory;
g_cap_table.hipImportExternalSemaphore_fn = capture_hipImportExternalSemaphore;
g_cap_table.hipInit_fn = capture_hipInit;
g_cap_table.hipInitDevice_fn = capture_hipInitDevice;
g_cap_table.hipIpcCloseMemHandle_fn = capture_hipIpcCloseMemHandle;
g_cap_table.hipIpcGetEventHandle_fn = capture_hipIpcGetEventHandle;
g_cap_table.hipIpcGetMemHandle_fn = capture_hipIpcGetMemHandle;
Expand Down Expand Up @@ -7984,6 +8028,7 @@ void hip_capture_build_table() {
g_cap_table.hipExecutionCtxRecordEvent_fn = capture_hipExecutionCtxRecordEvent;
g_cap_table.hipExecutionCtxSynchronize_fn = capture_hipExecutionCtxSynchronize;
g_cap_table.hipExecutionCtxWaitEvent_fn = capture_hipExecutionCtxWaitEvent;
g_cap_table.hipMemGetDefaultMemPool_fn = capture_hipMemGetDefaultMemPool;
}

void hip_capture_build_compiler_table() {
Expand Down
2 changes: 1 addition & 1 deletion projects/clr/hipamd/src/hrr/hip_capture_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#pragma once

#include "hip_capture.h"
#include "hrr_api_args.h"
#include "hrr/hrr_api_args.h"

#include <cstddef>
#include <cstdint>
Expand Down
58 changes: 0 additions & 58 deletions projects/clr/hipamd/src/hrr/playback/CMakeLists.txt

This file was deleted.

Loading
Loading