mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 05:31:24 +00:00
* fix(precommit_install): script now installs packages in virtual env * fix(precommit_install): installs packages in virtual env * feat(precommit): added ruff for python linting and formatting * feat(precommit): added ruff for python linting and formatting * feat(precommit): run ruff when py files are commited * feat(precommit): remod.py is run when ck_tile modified * add empty line at the end * style(precommit.yaml): remove empty line --------- Co-authored-by: Max Podkorytov <4273004+tenpercent@users.noreply.github.com>
18 lines
560 B
Bash
Executable File
18 lines
560 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get list of staged files
|
|
STAGED_FILES=$(git diff --cached --name-only)
|
|
|
|
# Check if any staged file is under include/ck_tile/ or example/ck_tile/
|
|
if echo "$STAGED_FILES" | grep -qE '^(include/ck_tile/|example/ck_tile/)'; then
|
|
echo "Detected changes in ck_tile-related files. Running remod.py..."
|
|
|
|
# Run remod.py in both required locations
|
|
(cd include/ck_tile/ && python3 remod.py)
|
|
(cd example/ck_tile/ && python3 remod.py)
|
|
|
|
echo "remod.py completed."
|
|
else
|
|
echo "No changes in ck_tile-related files. Skipping remod.py."
|
|
fi
|