Skip to content
Open
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
25 changes: 24 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,29 @@ jobs:
if-no-files-found: error
retention-days: 5

- name: Build RDC Examples
shell: bash
run: |
cd /opt/rocm/share/rdc/example
cmake -B build
make -C build -j $(nproc)

- name: Test RDC Examples
shell: bash
run: |
cd /opt/rocm/share/rdc/example/build
for example in ./diagnostic ./fieldvalue ./jobstats ./rocprofiler; do
echo "Testing $example..."
echo 0 | $example
if [ $? -ne 0 ]; then
echo "Example $example failed!"
exit 1
fi
done
echo "All examples ran successfully!"



test:
needs: build
runs-on: lstt
Expand Down Expand Up @@ -178,4 +201,4 @@ jobs:
exit 1
else
echo "No missing libs found!"
fi
fi
3 changes: 2 additions & 1 deletion example/diagnostic_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ int main(int, char**) {

// (2) start to run short diagnostic.
rdc_diag_response_t response;
result = rdc_diagnostic_run(rdc_handle, group_id, RDC_DIAG_LVL_SHORT, nullptr, 0, &response);
rdc_diag_callback_t callback;
result = rdc_diagnostic_run(rdc_handle, group_id, RDC_DIAG_LVL_SHORT, nullptr, 0, &response, &callback);

if (result != RDC_ST_OK) {
std::cout << "Error run RDC_DIAG_LVL_SHORT diagnostic. Return: " << rdc_status_string(result);
Expand Down
3 changes: 1 addition & 2 deletions example/rocprofiler_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ int run() {
field_ids.push_back(RDC_FI_GPU_MEMORY_USAGE);
field_ids.push_back(RDC_FI_POWER_USAGE);
// profiler metrics
field_ids.push_back(RDC_FI_PROF_MEAN_OCCUPANCY_PER_CU);
field_ids.push_back(RDC_FI_PROF_MEAN_OCCUPANCY_PER_ACTIVE_CU);
field_ids.push_back(RDC_FI_PROF_OCCUPANCY_PERCENT);
field_ids.push_back(RDC_FI_PROF_ACTIVE_CYCLES);
field_ids.push_back(RDC_FI_PROF_ACTIVE_WAVES);
field_ids.push_back(RDC_FI_PROF_ELAPSED_CYCLES);
Expand Down