Files
composable_kernel/script/count_vgpr.sh
Aviral Goel ab68c9d384 chore(copyright): update copyright header for script directory (#3184)
* chore(copyright): update copyright header for tile_engine directory

* chore(copyright): update copyright header for script directory

---------

Co-authored-by: Vidyasagar Ananthan <vanantha@amd.com>
2025-11-11 11:26:01 -08:00

24 lines
664 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
FILE=$1
for num in {0..255}
do
base_pattern="(\[?${num}\b|\[\d*:${num}\])"
spattern="s${base_pattern}"
vpattern="v${base_pattern}"
apattern="a${base_pattern}"
scount=$(grep -P $spattern $FILE | wc -l)
vcount=$(grep -P $vpattern $FILE | wc -l)
acount=$(grep -P $apattern $FILE | wc -l)
bash -c "echo -n v${num} $vcount && \
echo -n , s${num} $scount && \
echo -n , a${num} $acount"
if [[ $scount -ne 0 || $vcount -ne 0 || $acount -ne 0 ]]; then
echo -n " *"
fi
echo ""
done