mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 15:58:53 +00:00
Made by tools/layout/move_0216.py (the commit before this one) on db8e0be9c, the final code head of 0.2.16:
- 75 git mv (renames, so `git log --follow` and blame keep working; packaging/acceptance_matrix.md shows as delete + add because its links
changed too) and 3 removals: SETUP.bat, UPDATE.bat and update.sh (setup.py --update pulls the code now);
- 1,425 path edits in 307 files: root-relative paths in CI, Docker, .gitignore and the release scripts; Markdown links; Python and
Node joins from a root that moved with its folder; explicit edits for code that computes a root or names a moved path; tables of
repository paths inside tests.
engine/ holds what CMake builds (src, include, cmake, metal, sycl, spark, third_party, the C++ tests and benches). app/ is the desktop
app and its host (was apps/). terminal/ is the Terminal in the layout of the installed one (strata.py, setup.py, strata_cli,
strata_control, serve, bin, data, ref, crates, the Python tools and tests). docs/ has the documentation, docs/lang/ the translated
READMEs, docs/history and docs/bench-results. tools/ has the repository's own checks, packaging, docker, research and nix.
tests/core/test_tqp_ref.py is a pytest file and stays with the Python tests (terminal/tests/core/).
AGENTS.md, README.md, LICENSE, setup.sh and START-HERE.bat stay at the root.
No behaviour change: the same command lines, the same sources. For this head a replay of the script gave the same numbers and the path
scan (tools/layout/checks/path_scan.py) reports no hit; the suites and the builds run on this commit next.
27 lines
1.6 KiB
Bash
Executable File
27 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# normalize.sh <dpct-out-dir> <upstream-commit>: a fresh migrate.sh output in the port's shape, for a 3-way merge.
|
|
# - dpct's `X.cpp.dp.cpp` becomes `X.cpp` (the .cu -> .dp.cpp names stay), its .yaml/report files go
|
|
# - files dpct left byte-identical to the upstream original go too (sycl/CMakeLists.txt falls back to them)
|
|
# - the DPCTnnnn:<serial> message numbers are dropped (they renumber on every run and would be pure noise)
|
|
# - fixups.py runs on the result
|
|
# Updating the port after an upstream merge (docs/INTEL.md "Keeping up with upstream"):
|
|
# migrate the OLD upstream tree to sycl-base and the merged tree to sycl-new, normalize both with their
|
|
# commits, then for every file in both: git merge-file sycl/F sycl-base/F sycl-new/F
|
|
set -euo pipefail
|
|
d=$(cd "$1" && pwd); rev=$2; repo=$(cd "$(dirname "$0")/../.." && pwd)
|
|
cd "$d"
|
|
find . -name '*.yaml' -delete; rm -f dpct_report.*
|
|
find . -name '*.cpp.dp.cpp' | while read -r f; do mv "$f" "${f%.cpp.dp.cpp}.cpp"; done
|
|
n=0
|
|
while read -r f; do
|
|
rel=${f#./}; orig=$rel; [[ $rel == *.dp.cpp ]] && orig=${rel%.dp.cpp}.cu
|
|
if git -C "$repo" cat-file -e "$rev:$orig" 2>/dev/null && cmp -s "$f" <(git -C "$repo" show "$rev:$orig"); then
|
|
rm "$f"; n=$((n+1))
|
|
fi
|
|
done < <(find src include third_party -type f 2>/dev/null)
|
|
find . -type d -empty -delete
|
|
find src include -type f -exec sed -i -E 's/DPCT([0-9]{4}):[0-9]+:/DPCT\1:/' {} +
|
|
mkdir -p tools && cp "$repo/sycl/tools/fixups.py" tools/
|
|
python3 tools/fixups.py > fixups.log 2>&1 || { tail -5 fixups.log; exit 1; }
|
|
echo "$d: dropped $n unchanged files, $(find src include -type f | wc -l) remain, fixups applied: $(grep -c fixed fixups.log)"
|