diff --git a/akg-mlir/CMakeLists.txt b/akg-mlir/CMakeLists.txt index 98121c9570a0a8cfc3707872ce986fe9bc0282b0..3e5a930ea21ca5dbb1f811fef5c04ba5ba704510 100644 --- a/akg-mlir/CMakeLists.txt +++ b/akg-mlir/CMakeLists.txt @@ -97,7 +97,7 @@ set(LLVM_REQUIRES_RTTI ON) include(${CMAKE_SOURCE_DIR}/cmake/MLIR.cmake) include(${CMAKE_SOURCE_DIR}/cmake/external_libs/glog.cmake) -#include(${CMAKE_SOURCE_DIR}/cmake/external_libs/ascendnpu_ir.cmake) +include(${CMAKE_SOURCE_DIR}/cmake/external_libs/ascendnpu_ir.cmake) set(JSON_TARBALL_URL "${AKG_MLIR_SOURCE_DIR}/../third-party/JSON-for-Modern-CPP-v3.10.1.zip") @@ -115,12 +115,12 @@ add_subdirectory(${AKG_MLIR_SOURCE_DIR}/include ${AKG_MLIR_BINARY_DIR}/include) add_subdirectory(${AKG_MLIR_SOURCE_DIR}/tools ${AKG_MLIR_BINARY_DIR}/tools) -if (AKG_INCLUDE_TESTS) +if(AKG_INCLUDE_TESTS) add_definitions(-DAKG_INCLUDE_TESTS) endif() # Build tests -if (AKG_INCLUDE_TESTS) +if(AKG_INCLUDE_TESTS) add_subdirectory(tests) endif() diff --git a/akg-mlir/cmake/external_libs/ascendnpu_ir.cmake b/akg-mlir/cmake/external_libs/ascendnpu_ir.cmake index 00d23527a952931670a5f2b94489aa397666d74d..831ae345eecc04ed1ca4b1c55cc91431fdf61dfa 100644 --- a/akg-mlir/cmake/external_libs/ascendnpu_ir.cmake +++ b/akg-mlir/cmake/external_libs/ascendnpu_ir.cmake @@ -1,36 +1,15 @@ -set(AscendNpuIR_VERSION "v0.4-beta") -set(AscendNpuIR_URL "https://gitee.com/ascend/ascendnpu-ir/archive/refs/tags/${AscendNpuIR_VERSION}.tar.gz") -set(AscendNpuIR_MD5 "c3f9e8fda069ce04533815f3ed6760e0") - -if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") - set(BishengIR_URL - "https://gitee.com/ascend/ascendnpu-ir/releases/download/${AscendNpuIR_VERSION}/bishengir_x86.tar.gz") - set(BishengIR_MD5 "ea33b239a5edd96a5285f7d5ab1bae90") -elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64") - set(BishengIR_URL - "https://gitee.com/ascend/ascendnpu-ir/releases/download/${AscendNpuIR_VERSION}/bishengir_aarch64.tar.gz") - set(BishengIR_MD5 "9cc2569882475d1dc59da4142c0f96be") -else() - message(FATAL_ERROR "runtime only support aarch64 and x86_64") -endif() - -akg_add_pkg(bisheng_ir - VER 0.4.0 - HEAD_ONLY ./ - URL ${BishengIR_URL} - MD5 ${BishengIR_MD5}) - -akg_add_pkg(ascendnpu_ir - VER 0.4.0 - HEAD_ONLY bishengir/include - URL ${AscendNpuIR_URL} - MD5 ${AscendNpuIR_MD5}) - -execute_process(COMMAND chmod -R +x ${bisheng_ir_ROOT}/bin - WORKING_DIRECTORY ${bisheng_ir_ROOT}/bin - RESULT_VARIABLE Result) -include_directories(${ascendnpu_ir_INC} - ${CMAKE_CURRENT_BINARY_DIR}/bisheng_ir_build/bishengir/include) -set(BISHENG_IR_INSTALL_PATH ${bisheng_ir_ROOT} CACHE STRING - "install path for pre-build required for bishengir") -add_subdirectory(${ascendnpu_ir_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/bisheng_ir_build) +set(AscendNPU-IR_URL "https://gitcode.com/Ascend/AscendNPU-IR.git") +set(AscendNPU-IR_TAG "e4633e70f812b7c483768fdcc850c6077a3727e1") +set(AscendNPU-IR_MD5 "e4633e70f812b7c483768fdcc850c6077a3727e1") #not used + +akg_add_pkg(ascendnpu-ir + HEAD_ONLY bishengir/include + GIT_REPOSITORY ${AscendNPU-IR_URL} + GIT_TAG ${AscendNPU-IR_TAG} + MD5 ${AscendNPU-IR_MD5} + PATCHES ${CMAKE_SOURCE_DIR}/third-party/patch/ascendnpu-ir/0001-adapter-akg.patch) + +set(BISHENGIR_BUILD_STANDALONE_IR_ONLY ON) +include_directories(${ascendnpu-ir_INC}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/ascendnpu-ir/bishengir/include) +add_subdirectory(${ascendnpu-ir_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/ascendnpu-ir) diff --git a/akg-mlir/cmake/utils.cmake b/akg-mlir/cmake/utils.cmake index 81d2e6f0ca45753df3b551e50ed1b63acdddb551..adb32433475a2cab68919f459b71d3c0499fa040 100644 --- a/akg-mlir/cmake/utils.cmake +++ b/akg-mlir/cmake/utils.cmake @@ -1,9 +1,9 @@ include(FetchContent) set(FETCHCONTENT_QUIET OFF) -if (CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.17.0) +if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.17.0) set(CMAKE_FIND_LIBRARY_SUFFIXES .dll ${CMAKE_FIND_LIBRARY_SUFFIXES}) -endif () +endif() function(akg_add_submodule_obj des_submodule_objs sub_dir submodule_name_obj) @@ -20,45 +20,45 @@ function(akg_add_submodule_obj des_submodule_objs sub_dir submodule_name_obj) endfunction() -if (DEFINED ENV{MSLIBS_CACHE_PATH}) +if(DEFINED ENV{MSLIBS_CACHE_PATH}) set(_MS_LIB_CACHE $ENV{MSLIBS_CACHE_PATH}) else() set(_MS_LIB_CACHE ${CMAKE_BINARY_DIR}/.mslib) -endif () +endif() message("MS LIBS CACHE PATH: ${_MS_LIB_CACHE}") -if (NOT EXISTS ${_MS_LIB_CACHE}) +if(NOT EXISTS ${_MS_LIB_CACHE}) file(MAKE_DIRECTORY ${_MS_LIB_CACHE}) -endif () +endif() -if (DEFINED ENV{MSLIBS_SERVER}) +if(DEFINED ENV{MSLIBS_SERVER}) set(LOCAL_LIBS_SERVER $ENV{MSLIBS_SERVER}) message("LOCAL_LIBS_SERVER: ${LOCAL_LIBS_SERVER}") -endif () +endif() include(ProcessorCount) ProcessorCount(N) -if (JOBS) +if(JOBS) set(THNUM ${JOBS}) else() set(JOBS 8) - if (${JOBS} GREATER ${N}) + if(${JOBS} GREATER ${N}) set(THNUM ${N}) else() set(THNUM ${JOBS}) endif() -endif () +endif() message("set make thread num: ${THNUM}") if(LOCAL_LIBS_SERVER) - if (NOT ENV{no_proxy}) + if(NOT ENV{no_proxy}) set(ENV{no_proxy} "${LOCAL_LIBS_SERVER}") else() string(FIND $ENV{no_proxy} ${LOCAL_LIBS_SERVER} IP_POS) - if (${IP_POS} EQUAL -1) + if(${IP_POS} EQUAL -1) set(ENV{no_proxy} "$ENV{no_proxy},${LOCAL_LIBS_SERVER}") - endif () - endif () + endif() + endif() endif() function(__download_pkg pkg_name pkg_url pkg_md5) @@ -68,11 +68,7 @@ function(__download_pkg pkg_name pkg_url pkg_md5) set(pkg_url "http://${LOCAL_LIBS_SERVER}:8081/libs/${pkg_name}/${_URL_FILE_NAME}" ${pkg_url}) endif() - FetchContent_Declare( - ${pkg_name} - URL ${pkg_url} - URL_HASH MD5=${pkg_md5} - ) + FetchContent_Declare(${pkg_name} URL ${pkg_url} URL_HASH MD5=${pkg_md5}) FetchContent_GetProperties(${pkg_name}) message("download: ${${pkg_name}_SOURCE_DIR} , ${pkg_name} , ${pkg_url}") if(NOT ${pkg_name}_POPULATED) @@ -82,21 +78,13 @@ function(__download_pkg pkg_name pkg_url pkg_md5) endfunction() -function(__download_pkg_with_git pkg_name pkg_url pkg_git_commit pkg_md5) +function(__download_pkg_with_git pkg_name pkg_url pkg_git_commit pkg_git_submudules pkg_md5) - if(LOCAL_LIBS_SERVER) - set(pkg_url "http://${LOCAL_LIBS_SERVER}:8081/libs/${pkg_name}/${pkg_git_commit}") - FetchContent_Declare( - ${pkg_name} - URL ${pkg_url} - URL_HASH MD5=${pkg_md5} - ) - else() - FetchContent_Declare( - ${pkg_name} - GIT_REPOSITORY ${pkg_url} - GIT_TAG ${pkg_git_commit}) - endif() + FetchContent_Declare( + ${pkg_name} + GIT_REPOSITORY ${pkg_url} + GIT_TAG ${pkg_git_commit} + GIT_SUBMODULES "${pkg_git_submudules}") FetchContent_GetProperties(${pkg_name}) message("download: ${${pkg_name}_SOURCE_DIR} , ${pkg_name} , ${pkg_url}") if(NOT ${pkg_name}_POPULATED) @@ -120,20 +108,18 @@ function(__find_pkg_then_add_target pkg_name pkg_exe lib_path) endif() add_executable(${pkg_name}::${pkg_exe} IMPORTED GLOBAL) set_target_properties(${pkg_name}::${pkg_exe} PROPERTIES - IMPORTED_LOCATION ${${pkg_exe}_EXE} - ) + IMPORTED_LOCATION ${${pkg_exe}_EXE}) message("found ${${pkg_exe}_EXE}") endif() foreach(_LIB_NAME ${ARGN}) set(_LIB_SEARCH_NAME ${_LIB_NAME}) set(_LIB_TYPE SHARED) - if (${pkg_name}_USE_STATIC_LIBS) + if(${pkg_name}_USE_STATIC_LIBS) set(_LIB_SEARCH_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}${_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}") set(_LIB_TYPE STATIC) - endif () + endif() set(${_LIB_NAME}_LIB ${_LIB_NAME}_LIB-NOTFOUND) - message(" find_library(${_LIB_NAME}_LIB ${_LIB_SEARCH_NAME} PATHS ${${pkg_name}_BASE_DIR}/${lib_path} NO_DEFAULT_PATH)") find_library(${_LIB_NAME}_LIB ${_LIB_SEARCH_NAME} PATHS ${${pkg_name}_BASE_DIR}/${lib_path} NO_DEFAULT_PATH) if(NOT ${_LIB_NAME}_LIB) @@ -141,32 +127,32 @@ function(__find_pkg_then_add_target pkg_name pkg_exe lib_path) endif() add_library(${pkg_name}::${_LIB_NAME} ${_LIB_TYPE} IMPORTED GLOBAL) - if (WIN32 AND ${_LIB_TYPE} STREQUAL "SHARED") + if(WIN32 AND ${_LIB_TYPE} STREQUAL "SHARED") set_target_properties(${pkg_name}::${_LIB_NAME} PROPERTIES IMPORTED_IMPLIB_RELEASE ${${_LIB_NAME}_LIB}) else() set_target_properties(${pkg_name}::${_LIB_NAME} PROPERTIES IMPORTED_LOCATION ${${_LIB_NAME}_LIB}) endif() - if (EXISTS ${${pkg_name}_BASE_DIR}/include) + if(EXISTS ${${pkg_name}_BASE_DIR}/include) set_target_properties(${pkg_name}::${_LIB_NAME} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${${pkg_name}_BASE_DIR}/include") - endif () + endif() list(APPEND ${pkg_name}_LIBS ${pkg_name}::${_LIB_NAME}) message("found ${${_LIB_NAME}_LIB}") - STRING( REGEX REPLACE "(.+)/(.+)" "\\1" LIBPATH ${${_LIB_NAME}_LIB}) + STRING(REGEX REPLACE "(.+)/(.+)" "\\1" LIBPATH ${${_LIB_NAME}_LIB}) set(${pkg_name}_LIBPATH ${LIBPATH} CACHE STRING INTERNAL) - endforeach(_LIB_NAME) + endforeach() set(${pkg_name}_LIBS ${${pkg_name}_LIBS} PARENT_SCOPE) endfunction() function(__exec_cmd) - set(options ) + set(options) set(oneValueArgs WORKING_DIRECTORY) set(multiValueArgs COMMAND) - cmake_parse_arguments(EXEC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + cmake_parse_arguments(EXEC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) execute_process(COMMAND ${EXEC_COMMAND} WORKING_DIRECTORY ${EXEC_WORKING_DIRECTORY} @@ -178,36 +164,36 @@ endfunction() function(__check_patches pkg_patches) # check patches - if (PKG_PATCHES) + if(PKG_PATCHES) file(TOUCH ${_MS_LIB_CACHE}/${pkg_name}_patch.md5) file(READ ${_MS_LIB_CACHE}/${pkg_name}_patch.md5 ${pkg_name}_PATCHES_MD5) message("patches md5:${${pkg_name}_PATCHES_MD5}") - set(${pkg_name}_PATCHES_NEW_MD5 ) + set(${pkg_name}_PATCHES_NEW_MD5) foreach(_PATCH ${PKG_PATCHES}) file(MD5 ${_PATCH} _PF_MD5) set(${pkg_name}_PATCHES_NEW_MD5 "${${pkg_name}_PATCHES_NEW_MD5},${_PF_MD5}") - endforeach(_PATCH) + endforeach() - if (NOT ${pkg_name}_PATCHES_MD5 STREQUAL ${pkg_name}_PATCHES_NEW_MD5) + if(NOT ${pkg_name}_PATCHES_MD5 STREQUAL ${pkg_name}_PATCHES_NEW_MD5) set(${pkg_name}_PATCHES ${PKG_PATCHES}) file(REMOVE_RECURSE "${_MS_LIB_CACHE}/${pkg_name}-subbuild") file(WRITE ${_MS_LIB_CACHE}/${pkg_name}_patch.md5 ${${pkg_name}_PATCHES_NEW_MD5}) message("patches changed : ${${pkg_name}_PATCHES_NEW_MD5}") - endif () - endif () + endif() + endif() endfunction() set(AKG_FIND_NO_DEFAULT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH NO_CMAKE_SYSTEM_PACKAGE_REGISTRY) -function(akg_add_pkg pkg_name ) - set(options ) - set(oneValueArgs URL MD5 GIT_REPOSITORY GIT_TAG VER EXE DIR HEAD_ONLY CMAKE_PATH CUSTOM_CMAKE) +function(akg_add_pkg pkg_name) + set(options) + set(oneValueArgs URL MD5 GIT_REPOSITORY GIT_TAG GIT_SUBMODULES VER EXE DIR HEAD_ONLY CMAKE_PATH CUSTOM_CMAKE) set(multiValueArgs CMAKE_OPTION CONFIGURE_COMMAND LIBS PATCHES) - cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT PKG_LIB_PATH) set(PKG_LIB_PATH lib) @@ -218,17 +204,17 @@ function(akg_add_pkg pkg_name ) message("pkg name:${__FIND_PKG_NAME},${pkg_name}") # Generate hash for current pkg - set(${pkg_name}_CUSTOM_CMAKE_HASH ) + set(${pkg_name}_CUSTOM_CMAKE_HASH) if(PKG_CUSTOM_CMAKE) file(MD5 ${PKG_CUSTOM_CMAKE}/CMakeLists.txt _CUSTOM_CMAKE_MD5) set(${pkg_name}_CUSTOM_CMAKE_HASH "${_CUSTOM_CMAKE_MD5}") endif() - set(${pkg_name}_PATCHES_HASH ) + set(${pkg_name}_PATCHES_HASH) foreach(_PATCH ${PKG_PATCHES}) file(MD5 ${_PATCH} _PF_MD5) set(${pkg_name}_PATCHES_HASH "${${pkg_name}_PATCHES_HASH},${_PF_MD5}") - endforeach(_PATCH) + endforeach() # strip directory variables to ensure third party packages are installed in consistent locations string(REPLACE ${CMAKE_SOURCE_DIR} "" ARGN_STRIPPED ${ARGN}) @@ -254,7 +240,7 @@ function(akg_add_pkg pkg_name ) set(${__FIND_PKG_NAME}_ROOT ${${pkg_name}_BASE_DIR} PARENT_SCOPE) # Check if pkg exists in cache, if exists, use the cached one - if (PKG_LIBS) + if(PKG_LIBS) __find_pkg_then_add_target(${pkg_name} ${PKG_EXE} ${PKG_LIB_PATH} ${PKG_LIBS}) if(${pkg_name}_LIBS) set(${pkg_name}_INC ${${pkg_name}_BASE_DIR}/include PARENT_SCOPE) @@ -266,17 +252,17 @@ function(akg_add_pkg pkg_name ) # Download pkg if(NOT PKG_DIR) if(PKG_GIT_REPOSITORY) - __download_pkg_with_git(${pkg_name} ${PKG_GIT_REPOSITORY} ${PKG_GIT_TAG} ${PKG_MD5}) + __download_pkg_with_git(${pkg_name} ${PKG_GIT_REPOSITORY} ${PKG_GIT_TAG} "${PKG_GIT_SUBMODULES}" ${PKG_MD5}) else() message("--__download_pkg") - __download_pkg(${pkg_name} ${PKG_URL} ${PKG_MD5}) + __download_pkg(${pkg_name} ${PKG_URL} ${PKG_MD5}) endif() foreach(_SUBMODULE_FILE ${PKG_SUBMODULES}) - STRING( REGEX REPLACE "(.+)_(.+)" "\\1" _SUBMODEPATH ${_SUBMODULE_FILE}) - STRING( REGEX REPLACE "(.+)/(.+)" "\\2" _SUBMODENAME ${_SUBMODEPATH}) + STRING(REGEX REPLACE "(.+)_(.+)" "\\1" _SUBMODEPATH ${_SUBMODULE_FILE}) + STRING(REGEX REPLACE "(.+)/(.+)" "\\2" _SUBMODENAME ${_SUBMODEPATH}) file(GLOB ${pkg_name}_INSTALL_SUBMODULE ${_SUBMODULE_FILE}/*) file(COPY ${${pkg_name}_INSTALL_SUBMODULE} DESTINATION ${${pkg_name}_SOURCE_DIR}/3rdparty/${_SUBMODENAME}) - endforeach (_SUBMODULE_FILE) + endforeach() else() # Check if pkg is valid if(NOT EXISTS ${PKG_DIR}) @@ -316,6 +302,24 @@ function(akg_add_pkg pkg_name ) file(COPY ${${pkg_name}_SOURCE_DIR}/ DESTINATION ${${pkg_name}_PATCHED_DIR}) set(${pkg_name}_SOURCE_DIR ${${pkg_name}_PATCHED_DIR}) + # Convert line endings to LF before applying patches to avoid line ending mismatch + execute_process(COMMAND find ${${pkg_name}_SOURCE_DIR} -type f -name "*.txt" -o -name "*.cmake" + -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -o -name "*.c" + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR} + OUTPUT_VARIABLE FILES_TO_CONVERT + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(FILES_TO_CONVERT) + set(convert_command "find ${${pkg_name}_SOURCE_DIR} -type f \\( -name '*.txt' -o -name '*.cmake' ") + string(APPEND convert_command "-o -name '*.cpp' -o -name '*.h' -o -name '*.hpp' -o -name '*.c' \\) ") + string(APPEND convert_command "-exec sed -i 's/\\r$//' {} +") + execute_process(COMMAND bash -c "${convert_command}" + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR} + RESULT_VARIABLE CONVERT_RESULT) + if(NOT CONVERT_RESULT EQUAL "0") + message(WARNING "Failed to convert line endings for some files, patch may still fail") + endif() + endif() + # Apply patches on pkg foreach(_PATCH_FILE ${PKG_PATCHES}) get_filename_component(_PATCH_FILE_NAME ${_PATCH_FILE} NAME) @@ -328,7 +332,7 @@ function(akg_add_pkg pkg_name ) if(NOT Result EQUAL "0") message(FATAL_ERROR "Failed patch: ${_LF_PATCH_FILE}") endif() - endforeach(_PATCH_FILE) + endforeach() file(LOCK ${${pkg_name}_BASE_DIR} DIRECTORY GUARD FUNCTION RESULT_VARIABLE ${pkg_name}_LOCK_RET TIMEOUT 600) if(NOT ${pkg_name}_LOCK_RET EQUAL "0") @@ -356,12 +360,12 @@ function(akg_add_pkg pkg_name ) if(${pkg_name}_CFLAGS) set(${pkg_name}_CMAKE_CFLAGS "-DCMAKE_C_FLAGS=${${pkg_name}_CFLAGS}") endif() - if (${pkg_name}_CXXFLAGS) + if(${pkg_name}_CXXFLAGS) set(${pkg_name}_CMAKE_CXXFLAGS "-DCMAKE_CXX_FLAGS=${${pkg_name}_CXXFLAGS}") endif() - if (${pkg_name}_LDFLAGS) - if (${pkg_name}_USE_STATIC_LIBS) + if(${pkg_name}_LDFLAGS) + if(${pkg_name}_USE_STATIC_LIBS) set(${pkg_name}_CMAKE_LDFLAGS "-DCMAKE_STATIC_LINKER_FLAGS=${${pkg_name}_LDFLAGS}") else() set(${pkg_name}_CMAKE_LDFLAGS "-DCMAKE_SHARED_LINKER_FLAGS=${${pkg_name}_LDFLAGS}") @@ -369,27 +373,27 @@ function(akg_add_pkg pkg_name ) endif() __exec_cmd(COMMAND ${CMAKE_COMMAND} ${PKG_CMAKE_OPTION} -G ${CMAKE_GENERATOR} - ${${pkg_name}_CMAKE_CFLAGS} ${${pkg_name}_CMAKE_CXXFLAGS} ${${pkg_name}_CMAKE_LDFLAGS} - ${${pkg_name}_CONFIG_FILE_DIR} ${${pkg_name}_DEPEND_INCLUDE_DIR} ${${pkg_name}_DEPEND_LIB_DIR} - -DCMAKE_INSTALL_PREFIX=${${pkg_name}_BASE_DIR} ${${pkg_name}_SOURCE_DIR}/${PKG_CMAKE_PATH} - WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}/_build) + ${${pkg_name}_CMAKE_CFLAGS} ${${pkg_name}_CMAKE_CXXFLAGS} ${${pkg_name}_CMAKE_LDFLAGS} + ${${pkg_name}_CONFIG_FILE_DIR} ${${pkg_name}_DEPEND_INCLUDE_DIR} ${${pkg_name}_DEPEND_LIB_DIR} + -DCMAKE_INSTALL_PREFIX=${${pkg_name}_BASE_DIR} ${${pkg_name}_SOURCE_DIR}/${PKG_CMAKE_PATH} + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}/_build) __exec_cmd(COMMAND ${CMAKE_COMMAND} --build . --target install -- -j${THNUM} - WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}/_build) + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}/_build) elseif(PKG_CONFIGURE_COMMAND) - __exec_cmd(COMMAND ${PKG_CONFIGURE_COMMAND} - ${${pkg_name}_MAKE_CFLAGS} ${${pkg_name}_MAKE_CXXFLAGS} ${${pkg_name}_MAKE_LDFLAGS} - --prefix=${${pkg_name}_BASE_DIR} - WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}) - __exec_cmd(COMMAND ${CMAKE_MAKE_PROGRAM} ${${pkg_name}_BUILD_OPTION} -j${THNUM} - WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}) - __exec_cmd(COMMAND ${CMAKE_MAKE_PROGRAM} install - WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}) + __exec_cmd(COMMAND ${PKG_CONFIGURE_COMMAND} + ${${pkg_name}_MAKE_CFLAGS} ${${pkg_name}_MAKE_CXXFLAGS} ${${pkg_name}_MAKE_LDFLAGS} + --prefix=${${pkg_name}_BASE_DIR} + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}) + __exec_cmd(COMMAND ${CMAKE_MAKE_PROGRAM} ${${pkg_name}_BUILD_OPTION} -j${THNUM} + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}) + __exec_cmd(COMMAND ${CMAKE_MAKE_PROGRAM} install + WORKING_DIRECTORY ${${pkg_name}_SOURCE_DIR}) endif() endif() - if (PKG_LIBS) + if(PKG_LIBS) __find_pkg_then_add_target(${pkg_name} ${PKG_EXE} ${PKG_LIB_PATH} ${PKG_LIBS}) set(${pkg_name}_INC ${${pkg_name}_BASE_DIR}/include PARENT_SCOPE) if(NOT ${pkg_name}_LIBS) @@ -397,7 +401,7 @@ function(akg_add_pkg pkg_name ) endif() else() find_package(${__FIND_PKG_NAME} ${PKG_VER} QUIET) - if (${__FIND_PKG_NAME}_FOUND) + if(${__FIND_PKG_NAME}_FOUND) set(${pkg_name}_INC ${${pkg_name}_BASE_DIR}/include PARENT_SCOPE) message("Found pkg: ${${__FIND_PKG_NAME}_LIBRARIES}") return() diff --git a/akg-mlir/compiler/tools/akg-opt/CMakeLists.txt b/akg-mlir/compiler/tools/akg-opt/CMakeLists.txt index 8f285f4d4d64a5e2b5e74ddc62300772e1e94cce..2cebd706225d63cb26d2a5bf09965278d2fdbf7c 100644 --- a/akg-mlir/compiler/tools/akg-opt/CMakeLists.txt +++ b/akg-mlir/compiler/tools/akg-opt/CMakeLists.txt @@ -25,6 +25,17 @@ set(LIBS ${conversion_libs} ${AKG_MLIR_LIBS} AKGLinalgPasses + BiShengIRDialectUtils + BiShengIRAnnotationDialect + BiShengIRHACCDialect + BiShengIRHFusionDialect + BiShengIRSymbolDialect + BiShengIRMathExtDialect + BiShengIRDialectUtils + BiShengIRTensorDialect + BiShengIRMemRefDialect + BiShengIRHIVMDialect + BiShengIRHIVMUtils MLIRAnalysis MLIRDialect MLIROptLib @@ -37,9 +48,7 @@ set(LIBS MLIRMlirOptMain ) -link_directories( - ${AKG_MLIR_BIN_LIB_DIR} - ${BISHENG_IR_INSTALL_PATH}/lib) +link_directories(${AKG_MLIR_BIN_LIB_DIR}) add_executable(akg-opt akg-opt.cpp) add_dependencies(akg-opt ${LIBS}) diff --git a/akg-mlir/third-party/patch/ascendnpu-ir/0001-adapter-akg.patch b/akg-mlir/third-party/patch/ascendnpu-ir/0001-adapter-akg.patch new file mode 100644 index 0000000000000000000000000000000000000000..3378e60d7eaa26c6f39ccd97c02234e15740d1f9 --- /dev/null +++ b/akg-mlir/third-party/patch/ascendnpu-ir/0001-adapter-akg.patch @@ -0,0 +1,397 @@ +From 2df014eabd4cb402b6b1593177946e493ab5b744 Mon Sep 17 00:00:00 2001 +From: liuchao +Date: Sun, 7 Dec 2025 18:45:35 +0800 +Subject: [PATCH] adapter akg + +--- + CMakeLists.txt | 9 +- + bishengir/include/bishengir/CMakeLists.txt | 10 +-- + .../Dialect/Annotation/CMakeLists.txt | 2 +- + .../include/bishengir/Dialect/CMakeLists.txt | 8 +- + .../bishengir/Dialect/HACC/CMakeLists.txt | 2 +- + .../bishengir/Dialect/HFusion/CMakeLists.txt | 4 +- + .../bishengir/Dialect/HIVM/CMakeLists.txt | 4 +- + .../bishengir/Dialect/MemRef/CMakeLists.txt | 2 +- + .../Dialect/MemRef/IR/ExpandShapeUtils.h | 89 +++++++++++++++++++ + .../bishengir/Dialect/Symbol/CMakeLists.txt | 2 +- + .../lib/Dialect/Annotation/CMakeLists.txt | 2 +- + bishengir/lib/Dialect/HACC/CMakeLists.txt | 4 +- + bishengir/lib/Dialect/HFusion/CMakeLists.txt | 10 +-- + bishengir/lib/Dialect/HIVM/CMakeLists.txt | 8 +- + bishengir/lib/Dialect/HIVM/IR/HIVMDialect.cpp | 4 +- + bishengir/lib/Dialect/HIVM/Utils/Utils.cpp | 6 +- + bishengir/lib/Dialect/MemRef/CMakeLists.txt | 2 +- + .../lib/Dialect/MemRef/IR/MemRefImpl.cpp | 4 +- + bishengir/lib/Dialect/Symbol/CMakeLists.txt | 4 +- + bishengir/lib/Dialect/Tensor/CMakeLists.txt | 4 +- + 20 files changed, 134 insertions(+), 46 deletions(-) + create mode 100644 bishengir/include/bishengir/Dialect/MemRef/IR/ExpandShapeUtils.h + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2bbad54..e6bfa37 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + # BiShengIR Project. +-cmake_minimum_required(VERSION 3.28.0) ++cmake_minimum_required(VERSION 3.14.0) + project(bishengir) + + # bishengir-target-spec-tblgen related target has ninja version requirement +@@ -123,11 +123,6 @@ if(BISHENGIR_ENABLE_TORCH_CONVERSIONS) + include_directories(${TORCH_MLIR_INCLUDE_DIRS}) + endif() + +-if(MLIR_ENABLE_BINDINGS_PYTHON) +- include(MLIRDetectPythonEnv) +- mlir_configure_python_dev_packages() +-endif() +- + if(BISHENGIR_BUILD_EXAMPLES) + set(ASCEND_HOME_PATH $ENV{ASCEND_HOME_PATH} + CACHE STRING "Ascend CANN install path") +@@ -173,6 +168,7 @@ if (BISHENGIR_BUILD_STANDALONE_IR_ONLY) + add_subdirectory(bishengir/include/bishengir/Interfaces) + set(STANDALONE_IR_BUILD_DIALECT + Annotation ++ HACC + HFusion + HIVM + MemRef +@@ -188,6 +184,7 @@ if (BISHENGIR_BUILD_STANDALONE_IR_ONLY) + add_subdirectory(bishengir/include/bishengir/Dialect/MathExt) + add_subdirectory(bishengir/lib/Dialect/Math) + add_subdirectory(bishengir/lib/Dialect/Utils) ++ add_subdirectory(bishengir/lib/Dialect/HIVM/Utils) + else() + add_subdirectory(bishengir/include/bishengir) + add_subdirectory(bishengir/lib) +diff --git a/bishengir/include/bishengir/CMakeLists.txt b/bishengir/include/bishengir/CMakeLists.txt +index 8d16a4a..0ed288c 100644 +--- a/bishengir/include/bishengir/CMakeLists.txt ++++ b/bishengir/include/bishengir/CMakeLists.txt +@@ -1,6 +1,6 @@ +-add_subdirectory(Conversion) ++#add_subdirectory(Conversion) + add_subdirectory(Dialect) +-add_subdirectory(ExecutionEngine) +-add_subdirectory(Interfaces) +-add_subdirectory(Tools) +-add_subdirectory(Transforms) ++#add_subdirectory(ExecutionEngine) ++#add_subdirectory(Interfaces) ++#add_subdirectory(Tools) ++#add_subdirectory(Transforms) +diff --git a/bishengir/include/bishengir/Dialect/Annotation/CMakeLists.txt b/bishengir/include/bishengir/Dialect/Annotation/CMakeLists.txt +index 9f57627..218c20c 100644 +--- a/bishengir/include/bishengir/Dialect/Annotation/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/Annotation/CMakeLists.txt +@@ -1,2 +1,2 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) ++#add_subdirectory(Transforms) +diff --git a/bishengir/include/bishengir/Dialect/CMakeLists.txt b/bishengir/include/bishengir/Dialect/CMakeLists.txt +index 83e1673..6b436fe 100644 +--- a/bishengir/include/bishengir/Dialect/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/CMakeLists.txt +@@ -3,12 +3,12 @@ add_subdirectory(HACC) + add_subdirectory(HFusion) + add_subdirectory(HIVM) + add_subdirectory(MathExt) +-add_subdirectory(MemRef) ++#add_subdirectory(MemRef) + add_subdirectory(MemRefExt) +-add_subdirectory(SCF) ++#add_subdirectory(SCF) + add_subdirectory(Symbol) +-add_subdirectory(Tensor) ++#add_subdirectory(Tensor) + + if(BISHENGIR_ENABLE_TORCH_CONVERSIONS) +- add_subdirectory(Torch) ++ #add_subdirectory(Torch) + endif() +diff --git a/bishengir/include/bishengir/Dialect/HACC/CMakeLists.txt b/bishengir/include/bishengir/Dialect/HACC/CMakeLists.txt +index c76ed85..fbd0621 100644 +--- a/bishengir/include/bishengir/Dialect/HACC/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/HACC/CMakeLists.txt +@@ -1,3 +1,3 @@ + add_subdirectory(IR) + add_subdirectory(Targets) +-add_subdirectory(Transforms) ++#add_subdirectory(Transforms) +diff --git a/bishengir/include/bishengir/Dialect/HFusion/CMakeLists.txt b/bishengir/include/bishengir/Dialect/HFusion/CMakeLists.txt +index 660deb2..29ac6ff 100644 +--- a/bishengir/include/bishengir/Dialect/HFusion/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/HFusion/CMakeLists.txt +@@ -1,3 +1,3 @@ + add_subdirectory(IR) +-add_subdirectory(TransformOps) +-add_subdirectory(Transforms) ++#add_subdirectory(TransformOps) ++#add_subdirectory(Transforms) +diff --git a/bishengir/include/bishengir/Dialect/HIVM/CMakeLists.txt b/bishengir/include/bishengir/Dialect/HIVM/CMakeLists.txt +index 3593635..ad02aa3 100644 +--- a/bishengir/include/bishengir/Dialect/HIVM/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/HIVM/CMakeLists.txt +@@ -1,4 +1,4 @@ + add_subdirectory(Interfaces) + add_subdirectory(IR) +-add_subdirectory(TransformOps) +-add_subdirectory(Transforms) ++#add_subdirectory(TransformOps) ++#add_subdirectory(Transforms) +diff --git a/bishengir/include/bishengir/Dialect/MemRef/CMakeLists.txt b/bishengir/include/bishengir/Dialect/MemRef/CMakeLists.txt +index 5c919f7..e31af32 100644 +--- a/bishengir/include/bishengir/Dialect/MemRef/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/MemRef/CMakeLists.txt +@@ -1 +1 @@ +-add_subdirectory(Transforms) +\ No newline at end of file ++add_subdirectory(Transforms) +diff --git a/bishengir/include/bishengir/Dialect/MemRef/IR/ExpandShapeUtils.h b/bishengir/include/bishengir/Dialect/MemRef/IR/ExpandShapeUtils.h +new file mode 100644 +index 0000000..00a7272 +--- /dev/null ++++ b/bishengir/include/bishengir/Dialect/MemRef/IR/ExpandShapeUtils.h +@@ -0,0 +1,89 @@ ++//===- ExpandShapeUtils.h - Helpers related to expand shape ops -*- C++ -*-===// ++// ++// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ++// See https://llvm.org/LICENSE.txt for license information. ++// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++// ++//===----------------------------------------------------------------------===// ++// ++// This header file defines utilities and common canonicalization patterns for ++// expand shape operations. ++// ++//===----------------------------------------------------------------------===// ++ ++#include "mlir/Dialect/MemRef/IR/MemRef.h" ++#include "mlir/Dialect/Tensor/IR/Tensor.h" ++ ++namespace mlir { ++ ++template ++struct FoldConstantDimOfOutputShape : public OpRewritePattern { ++ using OpRewritePattern::OpRewritePattern; ++ ++ LogicalResult matchAndRewrite(ExpandShapeOpTy expandOp, ++ PatternRewriter &rewriter) const final { ++ // no constant to fold ++ ValueRange dynamicShapes = expandOp.getOutputShape(); ++ if (dynamicShapes.empty()) { ++ return failure(); ++ } ++ ++ // fold constant dynamic output shape values into static shape values ++ ArrayRef staticShapes = expandOp.getStaticOutputShape(); ++ SmallVector ofrs = ++ getMixedValues(staticShapes, dynamicShapes, rewriter); ++ LogicalResult fold = foldDynamicIndexList(ofrs); ++ if (failed(fold)) { ++ return failure(); ++ } ++ SmallVector foldedDynamicShape; ++ SmallVector foldedStaticShapes; ++ dispatchIndexOpFoldResults(ofrs, foldedDynamicShape, foldedStaticShapes); ++ ++ // clarify the reassociation type for overload resolution ++ SmallVector reassociation = ++ expandOp.getReassociationIndices(); ++ auto resultType = expandOp.getResultType(); ++ auto foldedResultType = resultType.clone(foldedStaticShapes); ++ auto srcType = expandOp.getSrcType(); ++ ++ // infer the src shape based on the folded result shape ++ ShapedType foldedSrcType; ++ if constexpr (std::is_same_v) { ++ RankedTensorType tensorTy = cast(foldedResultType); ++ foldedSrcType = ++ tensor::CollapseShapeOp::inferCollapsedType(tensorTy, reassociation); ++ } else if constexpr (std::is_same_v) { ++ MemRefType memrefTy = cast(foldedResultType); ++ foldedSrcType = memref::CollapseShapeOp::computeCollapsedType( ++ memrefTy, reassociation); ++ } else { ++ // only support ExpandShapeOp for tensor and memref ++ return failure(); ++ } ++ ++ // if src shape is changed, insert cast between src and op for compatibility ++ Value castFromSource = expandOp.getSrc(); ++ if (srcType != foldedSrcType) { ++ castFromSource = rewriter.create( ++ expandOp.getSrc().getLoc(), foldedSrcType, expandOp.getSrc()); ++ } ++ ++ // create new op with folded result shapes and (maybe new) source ++ auto newOp = ++ rewriter.create(expandOp.getLoc(), foldedResultType, ++ castFromSource, reassociation, ofrs); ++ // if resultType of new op is changed, insert cast between new op and all ++ // uses of origin op for compatibility ++ Value castToResult = newOp.getResult(); ++ if (castToResult.getType() != expandOp.getType()) { ++ castToResult = rewriter.create(expandOp.getLoc(), ++ expandOp.getType(), newOp); ++ } ++ rewriter.replaceOp(expandOp, castToResult); ++ return success(); ++ } ++}; ++ ++} // namespace mlir +diff --git a/bishengir/include/bishengir/Dialect/Symbol/CMakeLists.txt b/bishengir/include/bishengir/Dialect/Symbol/CMakeLists.txt +index 3b88171..218c20c 100644 +--- a/bishengir/include/bishengir/Dialect/Symbol/CMakeLists.txt ++++ b/bishengir/include/bishengir/Dialect/Symbol/CMakeLists.txt +@@ -1,2 +1,2 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) +\ No newline at end of file ++#add_subdirectory(Transforms) +diff --git a/bishengir/lib/Dialect/Annotation/CMakeLists.txt b/bishengir/lib/Dialect/Annotation/CMakeLists.txt +index 9f57627..218c20c 100644 +--- a/bishengir/lib/Dialect/Annotation/CMakeLists.txt ++++ b/bishengir/lib/Dialect/Annotation/CMakeLists.txt +@@ -1,2 +1,2 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) ++#add_subdirectory(Transforms) +diff --git a/bishengir/lib/Dialect/HACC/CMakeLists.txt b/bishengir/lib/Dialect/HACC/CMakeLists.txt +index 31167e6..fa8bb0d 100644 +--- a/bishengir/lib/Dialect/HACC/CMakeLists.txt ++++ b/bishengir/lib/Dialect/HACC/CMakeLists.txt +@@ -1,3 +1,3 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) +-add_subdirectory(Utils) ++#add_subdirectory(Transforms) ++#add_subdirectory(Utils) +diff --git a/bishengir/lib/Dialect/HFusion/CMakeLists.txt b/bishengir/lib/Dialect/HFusion/CMakeLists.txt +index 680d074..a26e20a 100644 +--- a/bishengir/lib/Dialect/HFusion/CMakeLists.txt ++++ b/bishengir/lib/Dialect/HFusion/CMakeLists.txt +@@ -1,6 +1,6 @@ +-add_subdirectory(Analysis) ++#add_subdirectory(Analysis) + add_subdirectory(IR) +-add_subdirectory(Pipelines) +-add_subdirectory(TransformOps) +-add_subdirectory(Transforms) +-add_subdirectory(Utils) ++#add_subdirectory(Pipelines) ++#add_subdirectory(TransformOps) ++#add_subdirectory(Transforms) ++#add_subdirectory(Utils) +diff --git a/bishengir/lib/Dialect/HIVM/CMakeLists.txt b/bishengir/lib/Dialect/HIVM/CMakeLists.txt +index 680d074..3807071 100644 +--- a/bishengir/lib/Dialect/HIVM/CMakeLists.txt ++++ b/bishengir/lib/Dialect/HIVM/CMakeLists.txt +@@ -1,6 +1,6 @@ +-add_subdirectory(Analysis) ++#add_subdirectory(Analysis) + add_subdirectory(IR) +-add_subdirectory(Pipelines) +-add_subdirectory(TransformOps) +-add_subdirectory(Transforms) ++#add_subdirectory(Pipelines) ++#add_subdirectory(TransformOps) ++#add_subdirectory(Transforms) + add_subdirectory(Utils) +diff --git a/bishengir/lib/Dialect/HIVM/IR/HIVMDialect.cpp b/bishengir/lib/Dialect/HIVM/IR/HIVMDialect.cpp +index b7437ee..f509b46 100644 +--- a/bishengir/lib/Dialect/HIVM/IR/HIVMDialect.cpp ++++ b/bishengir/lib/Dialect/HIVM/IR/HIVMDialect.cpp +@@ -17,9 +17,9 @@ + + #include "bishengir/Config/bishengir-config.h" + #include "bishengir/Dialect/HIVM/IR/HIVM.h" +-#if (!BISHENGIR_BUILD_STANDALONE_IR_ONLY) ++// #if (!BISHENGIR_BUILD_STANDALONE_IR_ONLY) + #include "bishengir/Dialect/HACC/IR/HACC.h" +-#endif // BISHENGIR_BUILD_STANDALONE_IR_ONLY ++// #endif // BISHENGIR_BUILD_STANDALONE_IR_ONLY + #include "bishengir/Dialect/HIVM/IR/HIVMImpl.h" + #include "bishengir/Dialect/HIVM/IR/HIVMInterfaces.h" + #include "bishengir/Dialect/HIVM/Utils/Utils.h" +diff --git a/bishengir/lib/Dialect/HIVM/Utils/Utils.cpp b/bishengir/lib/Dialect/HIVM/Utils/Utils.cpp +index b2419f4..a267fdd 100644 +--- a/bishengir/lib/Dialect/HIVM/Utils/Utils.cpp ++++ b/bishengir/lib/Dialect/HIVM/Utils/Utils.cpp +@@ -1031,9 +1031,9 @@ Value createNestedIndexModular(OpBuilder &builder, Operation *op, int modular) { + loopInfoVec, modular); + } + +-Value mlir::hivm::createNestedIndexModular(OpBuilder &builder, +- LoopLikeOpInterface loopOp, +- int modular) { ++Value createNestedIndexModular(OpBuilder &builder, ++ LoopLikeOpInterface loopOp, ++ int modular) { + auto loopInfoVec = getLoopsInfo(loopOp); + // Insert at the beginning of the For loop. + auto forOp = dyn_cast(loopOp.getOperation()); +diff --git a/bishengir/lib/Dialect/MemRef/CMakeLists.txt b/bishengir/lib/Dialect/MemRef/CMakeLists.txt +index 3b88171..218c20c 100644 +--- a/bishengir/lib/Dialect/MemRef/CMakeLists.txt ++++ b/bishengir/lib/Dialect/MemRef/CMakeLists.txt +@@ -1,2 +1,2 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) +\ No newline at end of file ++#add_subdirectory(Transforms) +diff --git a/bishengir/lib/Dialect/MemRef/IR/MemRefImpl.cpp b/bishengir/lib/Dialect/MemRef/IR/MemRefImpl.cpp +index 18266dd..e65fc84 100644 +--- a/bishengir/lib/Dialect/MemRef/IR/MemRefImpl.cpp ++++ b/bishengir/lib/Dialect/MemRef/IR/MemRefImpl.cpp +@@ -16,7 +16,7 @@ + //===----------------------------------------------------------------------===// + + #include "bishengir/Dialect/MemRef/IR/MemRefImpl.h" +-#include "mlir/Dialect/Utils/ExpandShapeUtils.h" ++#include "bishengir/Dialect/MemRef/IR/ExpandShapeUtils.h" + #include "mlir/IR/TypeUtilities.h" + + namespace { +@@ -219,10 +219,12 @@ Value createMemRefAllocOp(OpBuilder &builder, Location loc, Value source) { + + void getExtendedCanonicalizationPatterns(mlir::RewritePatternSet &results) { + auto *context = results.getContext(); ++ /* + results.add>(context, + "ReinterpretCastConstantArgumentFolder"); ++ */ + results.add(context); + results.add>(context); + } +diff --git a/bishengir/lib/Dialect/Symbol/CMakeLists.txt b/bishengir/lib/Dialect/Symbol/CMakeLists.txt +index 1a8b75d..fa8bb0d 100644 +--- a/bishengir/lib/Dialect/Symbol/CMakeLists.txt ++++ b/bishengir/lib/Dialect/Symbol/CMakeLists.txt +@@ -1,3 +1,3 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) +-add_subdirectory(Utils) +\ No newline at end of file ++#add_subdirectory(Transforms) ++#add_subdirectory(Utils) +diff --git a/bishengir/lib/Dialect/Tensor/CMakeLists.txt b/bishengir/lib/Dialect/Tensor/CMakeLists.txt +index 1a8b75d..fa8bb0d 100644 +--- a/bishengir/lib/Dialect/Tensor/CMakeLists.txt ++++ b/bishengir/lib/Dialect/Tensor/CMakeLists.txt +@@ -1,3 +1,3 @@ + add_subdirectory(IR) +-add_subdirectory(Transforms) +-add_subdirectory(Utils) +\ No newline at end of file ++#add_subdirectory(Transforms) ++#add_subdirectory(Utils) +-- +2.51.0 +