Skip to content

Commit 8d4c3ac

Browse files
authored
Revert "Memory log" (#2430)
Reverts #2360 This PR has some structural issues including #2429. See my post-merge feedback at #2360 (review).
1 parent 32d680d commit 8d4c3ac

File tree

9 files changed

+11
-1134
lines changed

9 files changed

+11
-1134
lines changed

.github/workflows/build_portable_linux_artifacts.yml

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ on:
2929
default: false
3030
extra_cmake_options:
3131
type: string
32-
monitor_memory:
33-
type: boolean
34-
default: false
3532

3633
workflow_call:
3734
inputs:
@@ -52,9 +49,6 @@ on:
5249
type: boolean
5350
extra_cmake_options:
5451
type: string
55-
monitor_memory:
56-
type: boolean
57-
default: false
5852

5953
# See the details regarding permissions from the link:
6054
# https://github.com/aws-actions/configure-aws-credentials?tab=readme-ov-file#oidc
@@ -76,7 +70,6 @@ jobs:
7670
options: -v /runner/config:/home/awsconfig/
7771
env:
7872
AWS_SHARED_CREDENTIALS_FILE: /home/awsconfig/credentials.ini
79-
BUILD_DIR: build
8073
CACHE_DIR: ${{ github.workspace }}/.container-cache
8174
# The ccache.conf will be written by setup_ccache.py before this gets used.
8275
CCACHE_CONFIGPATH: ${{ github.workspace }}/.ccache/ccache.conf
@@ -125,84 +118,39 @@ jobs:
125118
amdgpu_families: ${{ inputs.amdgpu_families }}
126119
package_version: ${{ inputs.package_version }}
127120
extra_cmake_options: ${{ inputs.extra_cmake_options }}
121+
BUILD_DIR: build
128122
run: |
129123
python3 build_tools/github_actions/build_configure.py --manylinux
130124
131-
- name: Start memory monitoring
132-
if: ${{ inputs.monitor_memory }}
133-
id: memory-monitor
134-
shell: bash
135-
continue-on-error: true
136-
run: |
137-
# Create logs directory in BUILD_DIR
138-
mkdir -p "${{ env.BUILD_DIR }}/logs"
139-
140-
# Start memory monitor in background
141-
python build_tools/memory_monitor.py \
142-
--phase "Build Phase" \
143-
--log-file "${{ env.BUILD_DIR }}/logs/build_memory_log_${{ github.job }}.jsonl" \
144-
--background > "${{ env.BUILD_DIR }}/logs/monitor_output_${{ github.job }}.txt" 2>&1 &
145-
146-
# Capture PID
147-
MONITOR_PID=$!
148-
echo "monitor-pid=$MONITOR_PID" >> $GITHUB_OUTPUT
149-
echo "Memory monitoring started with PID: $MONITOR_PID"
150-
sleep 2
151-
152125
- name: Build therock-archives and therock-dist
153126
run: |
154-
cmake --build ${{ env.BUILD_DIR }} --target therock-archives therock-dist -- -k 0
155-
156-
- name: Stop memory monitoring
157-
if: ${{ always() && inputs.monitor_memory && steps.memory-monitor.outputs.monitor-pid }}
158-
shell: bash
159-
continue-on-error: true
160-
env:
161-
MONITOR_PID: ${{ steps.memory-monitor.outputs.monitor-pid }}
162-
run: |
163-
echo "Stopping memory monitor (PID: $MONITOR_PID)"
164-
165-
# Send interrupt signal to stop monitoring gracefully
166-
if kill -0 $MONITOR_PID 2>/dev/null; then
167-
kill -SIGINT $MONITOR_PID
168-
sleep 2
169-
# Force kill if still running
170-
kill -9 $MONITOR_PID 2>/dev/null || true
171-
fi
172-
173-
echo "Memory monitor stopped"
174-
175-
# Display the monitor output
176-
if [ -f "${{ env.BUILD_DIR }}/logs/monitor_output_${{ github.job }}.txt" ]; then
177-
echo "=== Memory Monitor Output ==="
178-
cat "${{ env.BUILD_DIR }}/logs/monitor_output_${{ github.job }}.txt"
179-
fi
127+
cmake --build build --target therock-archives therock-dist -- -k 0
180128
181129
- name: Test Packaging
182130
if: ${{ github.event.repository.name == 'TheRock' }}
183131
run: |
184-
ctest --test-dir ${{ env.BUILD_DIR }} --output-on-failure
132+
ctest --test-dir build --output-on-failure
185133
186134
- name: Report
187135
if: ${{ !cancelled() }}
188136
shell: bash
189137
run: |
190-
if [ -d "${{ env.BUILD_DIR }}" ]; then
138+
if [ -d "./build" ]; then
191139
echo "Full SDK du:"
192140
echo "------------"
193-
du -h -d 1 ${{ env.BUILD_DIR }}/dist/rocm
141+
du -h -d 1 build/dist/rocm
194142
echo "Artifact Archives:"
195143
echo "------------------"
196-
ls -lh ${{ env.BUILD_DIR }}/artifacts/*.tar.xz
144+
ls -lh build/artifacts/*.tar.xz
197145
echo "Artifacts:"
198146
echo "----------"
199-
du -h -d 1 ${{ env.BUILD_DIR }}/artifacts
147+
du -h -d 1 build/artifacts
200148
echo "CCache Stats:"
201149
echo "-------------"
202150
ccache -s -v
203-
tail -v -n +1 .ccache/compiler_check_cache/* > ${{ env.BUILD_DIR }}/logs/ccache_compiler_check_cache.log
151+
tail -v -n +1 .ccache/compiler_check_cache/* > build/logs/ccache_compiler_check_cache.log
204152
else
205-
echo "[ERROR] Build directory ${{ env.BUILD_DIR }} does not exist. Skipping report!"
153+
echo "[ERROR] Build directory ./build does not exist. Skipping report!"
206154
echo " This should only happen if the CI is cancelled before the build step."
207155
exit 1
208156
fi
@@ -220,7 +168,7 @@ jobs:
220168
python3 build_tools/github_actions/post_build_upload.py \
221169
--run-id ${{ github.run_id }} \
222170
--artifact-group "${{ inputs.artifact_group }}" \
223-
--build-dir ${{ env.BUILD_DIR }} \
171+
--build-dir build \
224172
--upload
225173
226174
# - name: Upload job metrics to Redshift database

.github/workflows/build_windows_artifacts.yml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ on:
2828
type: boolean
2929
extra_cmake_options:
3030
type: string
31-
monitor_memory:
32-
type: boolean
33-
default: false
3431

3532
workflow_call:
3633
inputs:
@@ -51,9 +48,6 @@ on:
5148
type: boolean
5249
extra_cmake_options:
5350
type: string
54-
monitor_memory:
55-
type: boolean
56-
default: false
5751

5852
permissions:
5953
contents: read
@@ -151,58 +145,8 @@ jobs:
151145
ccache -z
152146
python3 build_tools/github_actions/build_configure.py
153147
154-
- name: Start memory monitoring
155-
if: ${{ inputs.monitor_memory }}
156-
id: memory-monitor
157-
shell: bash
158-
continue-on-error: true
159-
run: |
160-
# Create logs directory in BUILD_DIR
161-
mkdir -p "${{ env.BUILD_DIR }}/logs"
162-
163-
# Start memory monitor in background
164-
python build_tools/memory_monitor.py \
165-
--phase "Build Phase" \
166-
--log-file "${{ env.BUILD_DIR }}/logs/build_memory_log_${{ github.job }}.jsonl" \
167-
--background > "${{ env.BUILD_DIR }}/logs/monitor_output_${{ github.job }}.txt" 2>&1 &
168-
169-
# Capture PID
170-
MONITOR_PID=$!
171-
echo "monitor-pid=$MONITOR_PID" >> $GITHUB_OUTPUT
172-
echo "Memory monitoring started with PID: $MONITOR_PID"
173-
sleep 2
174-
175148
- name: Build therock-archives and therock-dist
176-
run: |
177-
cmake --build "${{ env.BUILD_DIR }}" --target therock-archives therock-dist -- -k 0
178-
179-
- name: Stop memory monitoring
180-
if: ${{ always() && inputs.monitor_memory && steps.memory-monitor.outputs.monitor-pid }}
181-
shell: bash
182-
continue-on-error: true
183-
env:
184-
MONITOR_PID: ${{ steps.memory-monitor.outputs.monitor-pid }}
185-
run: |
186-
echo "Stopping memory monitor (PID: $MONITOR_PID)"
187-
188-
# Send interrupt signal to stop monitoring gracefully
189-
if kill -0 $MONITOR_PID 2>/dev/null; then
190-
kill -SIGINT $MONITOR_PID
191-
sleep 2
192-
# Force kill if still running
193-
kill -9 $MONITOR_PID 2>/dev/null || true
194-
else
195-
# Fallback to taskkill on Windows (if bash kill doesn't work)
196-
taskkill //PID $MONITOR_PID //F 2>/dev/null || true
197-
fi
198-
199-
echo "Memory monitor stopped"
200-
201-
# Display the monitor output
202-
if [ -f "${{ env.BUILD_DIR }}/logs/monitor_output_${{ github.job }}.txt" ]; then
203-
echo "=== Memory Monitor Output ==="
204-
cat "${{ env.BUILD_DIR }}/logs/monitor_output_${{ github.job }}.txt"
205-
fi
149+
run: cmake --build "${{ env.BUILD_DIR }}" --target therock-archives therock-dist -- -k 0
206150

207151
- name: Report
208152
if: ${{ !cancelled() }}

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ on:
3131
linux_use_prebuilt_artifacts:
3232
type: boolean
3333
description: "If enabled, the CI will pull Linux artifacts using artifact_run_id and only run tests"
34-
monitor_memory:
35-
type: boolean
36-
description: "If enabled, memory monitoring will be performed during the build"
37-
default: false
3834
windows_amdgpu_families:
3935
type: string
4036
description: "Insert comma-separated list of Windows GPU families to build and test. ex: gfx94X, gfx1201X"
@@ -101,7 +97,6 @@ jobs:
10197
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
10298
test_type: ${{ needs.setup.outputs.test_type }}
10399
sanity_check_only_for_family: ${{ matrix.variant.sanity_check_only_for_family == true }}
104-
monitor_memory: ${{ inputs.monitor_memory == true }}
105100
permissions:
106101
contents: read
107102
id-token: write
@@ -133,7 +128,6 @@ jobs:
133128
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
134129
test_type: ${{ needs.setup.outputs.test_type }}
135130
sanity_check_only_for_family: ${{ matrix.variant.sanity_check_only_for_family == true }}
136-
monitor_memory: ${{ inputs.monitor_memory == true }}
137131
permissions:
138132
contents: read
139133
id-token: write

.github/workflows/ci_linux.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ on:
2929
type: string
3030
sanity_check_only_for_family:
3131
type: boolean
32-
monitor_memory:
33-
type: boolean
34-
default: false
3532

3633
permissions:
3734
contents: read
@@ -50,7 +47,6 @@ jobs:
5047
build_variant_cmake_preset: ${{ inputs.build_variant_cmake_preset }}
5148
build_variant_suffix: ${{ inputs.build_variant_suffix }}
5249
expect_failure: ${{ inputs.expect_failure }}
53-
monitor_memory: ${{ inputs.monitor_memory }}
5450
permissions:
5551
contents: read
5652
id-token: write

.github/workflows/ci_windows.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ on:
2929
type: string
3030
sanity_check_only_for_family:
3131
type: boolean
32-
monitor_memory:
33-
type: boolean
34-
default: false
3532

3633
permissions:
3734
contents: read
@@ -50,7 +47,6 @@ jobs:
5047
build_variant_suffix: ${{ inputs.build_variant_suffix }}
5148
package_version: ${{ inputs.rocm_package_version }}
5249
expect_failure: ${{ inputs.expect_failure }}
53-
monitor_memory: ${{ inputs.monitor_memory }}
5450
permissions:
5551
contents: read
5652
id-token: write

0 commit comments

Comments
 (0)