Skip to content

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

Merged
merged 33 commits into from
May 29, 2025

Conversation

erwei-xilinx
Copy link
Collaborator

@erwei-xilinx erwei-xilinx commented May 26, 2025

This PR replaces the ci workflow from using chess to using both peano and chess.

Copy link
Collaborator

@fifield fifield left a 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.

)
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))
Copy link
Collaborator

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)

Copy link
Collaborator Author

@erwei-xilinx erwei-xilinx May 29, 2025

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 30 to 56
@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 \
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

erwei-xilinx and others added 5 commits May 28, 2025 20:12
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>
@fifield fifield self-requested a review May 29, 2025 20:10
@erwei-xilinx erwei-xilinx merged commit a3d2def into main May 29, 2025
8 checks passed
@erwei-xilinx erwei-xilinx deleted the ci_switch_to_peano branch May 29, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants