mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 05:31:24 +00:00
Enhancements in precommit_install.sh for Python and CK Tile code (#2400)
* 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>
This commit is contained in:
17
script/remod_for_ck_tile.sh
Executable file
17
script/remod_for_ck_tile.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user