Skip to content
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

Change the paths for generated model MLIR files and data files to the build path. #441

Merged
merged 9 commits into from
Jan 8, 2025

Conversation

R-Tars
Copy link
Contributor

@R-Tars R-Tars commented Dec 27, 2024

No description provided.

@R-Tars R-Tars changed the title Change generate model mlir files and data files to build path Change the paths for generated model MLIR files and data files to the build path. Dec 27, 2024
@@ -1,33 +1,38 @@
add_custom_command(
OUTPUT ${BUDDY_EXAMPLES_DIR}/BuddyBert/forward.mlir ${BUDDY_EXAMPLES_DIR}/BuddyBert/subgraph0.mlir ${BUDDY_EXAMPLES_DIR}/BuddyBert/arg0.data ${BUDDY_EXAMPLES_DIR}/BuddyBert/arg1.data
COMMAND python3 ${BUDDY_EXAMPLES_DIR}/BuddyBert/import-bert.py
OUTPUT ${BUDDY_BINARY_DIR}/../examples/BuddyBert/forward.mlir
Copy link
Member

Choose a reason for hiding this comment

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

${CMAKE_CURRENT_BINARY_DIR}/forward.mlir

${BUDDY_BINARY_DIR}/../examples/BuddyBert/subgraph0.mlir
${BUDDY_BINARY_DIR}/../examples/BuddyBert/arg0.data
${BUDDY_BINARY_DIR}/../examples/BuddyBert/arg1.data
COMMAND python3 ${BUDDY_EXAMPLES_DIR}/BuddyBert/import-bert.py
Copy link
Member

Choose a reason for hiding this comment

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

${CMAKE_CURRENT_SOURCE_DIR}/import-bert.py

${BUDDY_BINARY_DIR}/../examples/BuddyBert/arg0.data
${BUDDY_BINARY_DIR}/../examples/BuddyBert/arg1.data
COMMAND python3 ${BUDDY_EXAMPLES_DIR}/BuddyBert/import-bert.py
--output-dir ${BUDDY_BINARY_DIR}/../examples/BuddyBert
Copy link
Member

Choose a reason for hiding this comment

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

${CMAKE_CURRENT_BINARY_DIR}

@@ -70,8 +70,8 @@ int main() {
/// Load weights to MemRef container.
MemRef<float, 1> arg0({109486854});
MemRef<long long, 1> arg1({512});
loadParameters("../../examples/BuddyBert/arg0.data",
"../../examples/BuddyBert/arg1.data", arg0, arg1);
loadParameters("../../build/examples/BuddyBert/arg0.data",
Copy link
Member

Choose a reason for hiding this comment

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

Use environment variable.

@zhanghb97 zhanghb97 merged commit 47d648c into buddy-compiler:main Jan 8, 2025
1 check passed
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