Skip to content

Commit

Permalink
remove prev iteration of generator
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Dec 30, 2024
1 parent e95f18c commit 0f37733
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5,979 deletions.
49 changes: 2 additions & 47 deletions projects/eudsl-py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,53 +364,8 @@ nanobind_add_module(eudslpy_ext
NB_STATIC
NB_DOMAIN eudsl
src/eudslpy_ext.cpp
${EUDSLGenacc_GENERATED_SHARDS}
${EUDSLGenaffine_GENERATED_SHARDS}
${EUDSLGenamdgpu_GENERATED_SHARDS}
${EUDSLGenamx_GENERATED_SHARDS}
${EUDSLGenarith_GENERATED_SHARDS}
${EUDSLGenarm_neon_GENERATED_SHARDS}
${EUDSLGenarm_sme_GENERATED_SHARDS}
${EUDSLGenarm_sve_GENERATED_SHARDS}
${EUDSLGenasync_GENERATED_SHARDS}
${EUDSLGenbufferization_GENERATED_SHARDS}
${EUDSLGencf_GENERATED_SHARDS}
${EUDSLGencomplex_GENERATED_SHARDS}
${EUDSLGenDLTIDialect_GENERATED_SHARDS}
# ${EUDSLGenemitc_GENERATED_SHARDS}
${EUDSLGenfunc_GENERATED_SHARDS}
${EUDSLGengpu_GENERATED_SHARDS}
${EUDSLGenindex_GENERATED_SHARDS}
# ${EUDSLGenirdl_GENERATED_SHARDS}
# ${EUDSLGenlinalg_GENERATED_SHARDS}
# ${EUDSLGenLLVM_GENERATED_SHARDS}
${EUDSLGenmath_GENERATED_SHARDS}
${EUDSLGenmemref_GENERATED_SHARDS}
${EUDSLGenmesh_GENERATED_SHARDS}
${EUDSLGenml_program_GENERATED_SHARDS}
${EUDSLGenmpi_GENERATED_SHARDS}
${EUDSLGennvgpu_GENERATED_SHARDS}
${EUDSLGenNVVM_GENERATED_SHARDS}
# ${EUDSLGenomp_GENERATED_SHARDS}
${EUDSLGenpdl_GENERATED_SHARDS}
${EUDSLGenpdl_interp_GENERATED_SHARDS}
${EUDSLGenpolynomial_GENERATED_SHARDS}
${EUDSLGenptr_GENERATED_SHARDS}
${EUDSLGenquant_GENERATED_SHARDS}
${EUDSLGenROCDL_GENERATED_SHARDS}
# ${EUDSLGenscf_GENERATED_SHARDS}
# ${EUDSLGenshape_GENERATED_SHARDS}
${EUDSLGensparse_tensor_GENERATED_SHARDS}
# ${EUDSLGenspirv_GENERATED_SHARDS}
${EUDSLGentensor_GENERATED_SHARDS}
${EUDSLGentosa_GENERATED_SHARDS}
${EUDSLGentransform_GENERATED_SHARDS}
${EUDSLGenub_GENERATED_SHARDS}
# ${EUDSLGenvector_GENERATED_SHARDS}
${EUDSLGenx86vector_GENERATED_SHARDS}
# ${EUDSLGenxegpu_GENERATED_SHARDS}
)
add_dependencies(eudslpy_ext
)
target_link_libraries(eudslpy_ext PRIVATE
EUDSLGenacc
EUDSLGenaffine
EUDSLGenamdgpu
Expand Down
26 changes: 8 additions & 18 deletions projects/eudsl-py/cmake/EUDSLPYConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# copy-pasta from AddMLIR.cmake/AddLLVM.cmake/TableGen.cmake

# Clear out any pre-existing compile_commands file before processing. This
# allows for generating a clean compile_commands on each configure.
file(REMOVE ${CMAKE_BINARY_DIR}/eudslpygen_compile_commands.yml)

# no clue why but with LLVM_LINK_LLVM_DYLIB even static libs depend on LLVM
get_property(MLIR_ALL_LIBS GLOBAL PROPERTY MLIR_ALL_LIBS)
foreach(_lib ${MLIR_ALL_LIBS})
Expand Down Expand Up @@ -139,23 +135,17 @@ function(eudslpygen target inputFile)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${fullGenFile}.sharded.cpp")
file(GLOB _generated_shards "${_gen_target_dir}/*.shard.*")
list(APPEND _generated_shards "${fullGenFile}.sharded.cpp")
set(${target}_GENERATED_SHARDS ${_generated_shards} PARENT_SCOPE)
add_library(${target} OBJECT ${_generated_shards})
execute_process(
COMMAND "${Python_EXECUTABLE}" -m nanobind --include_dir
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_include_dir)
target_include_directories(${target} PRIVATE ${eudslpygen_includes}
${Python_INCLUDE_DIRS} ${nanobind_include_dir})

# `make clean' must remove all those generated files:
# TODO(max): clean up dep files
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${fullGenFile})
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${fullGenFile} PROPERTIES
GENERATED 1)

# Append the includes used for this file to the pdll_compilation_commands
# file.
file(APPEND ${CMAKE_BINARY_DIR}/eudslpygen_compile_commands.yml
"--- !FileInfo:\n"
" filepath: \"${EUDSLPYGEN_TARGET_DEFINITIONS_ABSOLUTE}\"\n"
" includes: \"${CMAKE_CURRENT_SOURCE_DIR};${eudslpygen_includes}\"\n"
)

add_public_eudslpygen_target(${target} "${fullGenFile}.sharded.cpp;${_generated_shards}")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${_generated_shards})
set_source_files_properties(${_generated_shards} PROPERTIES GENERATED 1)
endfunction()

macro(add_eudslpygen target project)
Expand Down
1,283 changes: 0 additions & 1,283 deletions projects/eudsl-py/src/affine.cpp

This file was deleted.

2,788 changes: 0 additions & 2,788 deletions projects/eudsl-py/src/arith.cpp

This file was deleted.

110 changes: 0 additions & 110 deletions projects/eudsl-py/src/blacklists.py

This file was deleted.

Loading

0 comments on commit 0f37733

Please sign in to comment.