-
Notifications
You must be signed in to change notification settings - Fork 32
Update Ryzen AI CI workflow to switch to peano from chess #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, but I don't see the chess tests running.
programming_examples/lit.cfg.py
Outdated
) | ||
if re.search("Xilinx AI Engine", result.stdout.decode("utf-8")) is not None: | ||
config.available_features.add("peano") | ||
config.substitutions.append(("%PEANO_INSTALL_DIR", config.peano_tools_dir)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%PEANO_INSTALL_DIR
is only used to find peano clang++, we already add peano_tools_dir to PATH above (so clang++
is already supposed to be peano clang?), and also define %CLANG to be the system clang. Seems like "finding clang" needs some cleanup.
maybe just %peano_clang = path.join(config.peano_tools_dir, 'clang')
? (or %PEANO_CLANG
if shouting is preferred)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left %PEANO_INSTALL_DIR
there, as I am now using it to switch between peano and chess for each lit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@if [ "$(BACKEND)" = "peano" ]; then \ | ||
if [ -x "$(PEANO_INSTALL_DIR)/bin/clang++" ]; then \ | ||
echo "Using clang++ from PEANO_INSTALL_DIR=$(PEANO_INSTALL_DIR)"; \ | ||
$(PEANO_INSTALL_DIR)/bin/clang++ ${PEANOWRAP2_FLAGS} -DBIT_WIDTH=8 -c ${srcdir}/mm.cc -o build/mm.o; \ | ||
else \ | ||
echo "Error: llvm-aie pip package not found or invalid."; \ | ||
exit 1; \ | ||
fi \ | ||
elif [ "$(BACKEND)" = "xchesscc" ]; then \ | ||
if command -v xchesscc_wrapper >/dev/null 2>&1; then \ | ||
echo "Using xchesscc_wrapper from PATH"; \ | ||
cd build && ${powershell} xchesscc_wrapper aie2 -c ${srcdir}/mm.cc -o mm.o; \ | ||
else \ | ||
echo "Error: xchesscc_wrapper not found in PATH."; \ | ||
exit 1; \ | ||
fi \ | ||
else \ | ||
echo "Error: Neither LLVM_AIE_INSTALL_DIR nor xchesscc_wrapper found." >&2; \ | ||
exit 1; \ | ||
if [ -x "$(PEANO_INSTALL_DIR)/bin/clang++" ]; then \ | ||
echo "Auto-selected peano backend"; \ | ||
$(PEANO_INSTALL_DIR)/bin/clang++ ${PEANOWRAP2_FLAGS} -DBIT_WIDTH=8 -c ${srcdir}/mm.cc -o build/mm.o; \ | ||
elif command -v xchesscc_wrapper >/dev/null 2>&1; then \ | ||
echo "Auto-selected xchesscc backend"; \ | ||
cd build && ${powershell} xchesscc_wrapper aie2 -c ${srcdir}/mm.cc -o mm.o; \ | ||
else \ | ||
echo "Error: no usable backend found."; \ | ||
exit 1; \ | ||
fi \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this compile-kernel
rule the same everywhere? maybe a makefile.common
is appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is benefit to keeping each test's makefile local for now, as many tests here currently serve as programing examples. It might be helpful to keep the project structure clear.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR replaces the ci workflow from using chess to using both peano and chess.