diff --git a/projects/eudsl-py/CMakeLists.txt b/projects/eudsl-py/CMakeLists.txt index 6aa9823f..71486737 100644 --- a/projects/eudsl-py/CMakeLists.txt +++ b/projects/eudsl-py/CMakeLists.txt @@ -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 diff --git a/projects/eudsl-py/cmake/EUDSLPYConfig.cmake b/projects/eudsl-py/cmake/EUDSLPYConfig.cmake index fbfa728d..f15baeb8 100644 --- a/projects/eudsl-py/cmake/EUDSLPYConfig.cmake +++ b/projects/eudsl-py/cmake/EUDSLPYConfig.cmake @@ -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}) @@ -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) diff --git a/projects/eudsl-py/src/affine.cpp b/projects/eudsl-py/src/affine.cpp deleted file mode 100644 index 7a89d530..00000000 --- a/projects/eudsl-py/src/affine.cpp +++ /dev/null @@ -1,1283 +0,0 @@ - -#include "ir.h" -#include "mlir/IR/IntegerSet.h"; -#include "mlir/Dialect/Affine/IR/AffineValueMap.h" -namespace nb = nanobind; -using namespace nb::literals; -void populateAffineModule(nanobind::module_ & m) { -using namespace mlir; -using namespace mlir::detail; -using namespace mlir::affine; - -auto mlir_affine_detail_AffineReadOpInterfaceInterfaceTraits = nb::class_(m, "AffineReadOpInterfaceInterfaceTraits") -; - -auto mlir_affine_detail_AffineReadOpInterfaceInterfaceTraits_Concept = nb::class_(mlir_affine_detail_AffineReadOpInterfaceInterfaceTraits, "Concept") -; - -auto mlir_affine_AffineReadOpInterface = nb::class_(m, "AffineReadOpInterface") -.def_prop_ro("mem_ref", &mlir::affine::AffineReadOpInterface::getMemRef) -.def_prop_ro("mem_ref_type", &mlir::affine::AffineReadOpInterface::getMemRefType) -.def_prop_ro("map_operands", &mlir::affine::AffineReadOpInterface::getMapOperands) -.def_prop_ro("affine_map", &mlir::affine::AffineReadOpInterface::getAffineMap) -.def_prop_ro("value", &mlir::affine::AffineReadOpInterface::getValue) -; - -auto mlir_affine_detail_AffineWriteOpInterfaceInterfaceTraits = nb::class_(m, "AffineWriteOpInterfaceInterfaceTraits") -; - -auto mlir_affine_detail_AffineWriteOpInterfaceInterfaceTraits_Concept = nb::class_(mlir_affine_detail_AffineWriteOpInterfaceInterfaceTraits, "Concept") -; - -auto mlir_affine_AffineWriteOpInterface = nb::class_(m, "AffineWriteOpInterface") -.def_prop_ro("mem_ref", &mlir::affine::AffineWriteOpInterface::getMemRef) -.def_prop_ro("mem_ref_type", &mlir::affine::AffineWriteOpInterface::getMemRefType) -.def_prop_ro("map_operands", &mlir::affine::AffineWriteOpInterface::getMapOperands) -.def_prop_ro("affine_map", &mlir::affine::AffineWriteOpInterface::getAffineMap) -.def_prop_ro("value_to_store", &mlir::affine::AffineWriteOpInterface::getValueToStore) -; - -auto mlir_affine_detail_AffineMapAccessInterfaceInterfaceTraits = nb::class_(m, "AffineMapAccessInterfaceInterfaceTraits") -; - -auto mlir_affine_detail_AffineMapAccessInterfaceInterfaceTraits_Concept = nb::class_(mlir_affine_detail_AffineMapAccessInterfaceInterfaceTraits, "Concept") -; - -auto mlir_affine_AffineMapAccessInterface = nb::class_(m, "AffineMapAccessInterface") -.def("get_affine_map_attr_for_mem_ref", &mlir::affine::AffineMapAccessInterface::getAffineMapAttrForMemRef, "memref"_a) -; - -auto mlir_affine_AffineDmaStartOp = nb::class_(m, "AffineDmaStartOp") -.def_static("attribute_names", &mlir::affine::AffineDmaStartOp::getAttributeNames) -.def_static("build", &mlir::affine::AffineDmaStartOp::build, "builder"_a, "result"_a, "src_mem_ref"_a, "src_map"_a, "src_indices"_a, "dest_mem_ref"_a, "dst_map"_a, "dest_indices"_a, "tag_mem_ref"_a, "tag_map"_a, "tag_indices"_a, "num_elements"_a, "stride"_a, "elements_per_stride"_a) -.def_prop_ro("src_mem_ref_operand_index", &mlir::affine::AffineDmaStartOp::getSrcMemRefOperandIndex) -.def_prop_ro("src_mem_ref", &mlir::affine::AffineDmaStartOp::getSrcMemRef) -.def_prop_ro("src_mem_ref_mutable", &mlir::affine::AffineDmaStartOp::getSrcMemRefMutable) -.def_prop_ro("src_mem_ref_type", &mlir::affine::AffineDmaStartOp::getSrcMemRefType) -.def_prop_ro("src_mem_ref_rank", &mlir::affine::AffineDmaStartOp::getSrcMemRefRank) -.def_prop_ro("src_map", &mlir::affine::AffineDmaStartOp::getSrcMap) -.def_prop_ro("src_map_attr", &mlir::affine::AffineDmaStartOp::getSrcMapAttr) -.def_prop_ro("src_indices", &mlir::affine::AffineDmaStartOp::getSrcIndices) -.def_prop_ro("src_memory_space", &mlir::affine::AffineDmaStartOp::getSrcMemorySpace) -.def_prop_ro("dst_mem_ref_operand_index", &mlir::affine::AffineDmaStartOp::getDstMemRefOperandIndex) -.def_prop_ro("dst_mem_ref", &mlir::affine::AffineDmaStartOp::getDstMemRef) -.def_prop_ro("dst_mem_ref_mutable", &mlir::affine::AffineDmaStartOp::getDstMemRefMutable) -.def_prop_ro("dst_mem_ref_type", &mlir::affine::AffineDmaStartOp::getDstMemRefType) -.def_prop_ro("dst_mem_ref_rank", &mlir::affine::AffineDmaStartOp::getDstMemRefRank) -.def_prop_ro("dst_memory_space", &mlir::affine::AffineDmaStartOp::getDstMemorySpace) -.def_prop_ro("dst_map", &mlir::affine::AffineDmaStartOp::getDstMap) -.def_prop_ro("dst_map_attr", &mlir::affine::AffineDmaStartOp::getDstMapAttr) -.def_prop_ro("dst_indices", &mlir::affine::AffineDmaStartOp::getDstIndices) -.def_prop_ro("tag_mem_ref_operand_index", &mlir::affine::AffineDmaStartOp::getTagMemRefOperandIndex) -.def_prop_ro("tag_mem_ref", &mlir::affine::AffineDmaStartOp::getTagMemRef) -.def_prop_ro("tag_mem_ref_mutable", &mlir::affine::AffineDmaStartOp::getTagMemRefMutable) -.def_prop_ro("tag_mem_ref_type", &mlir::affine::AffineDmaStartOp::getTagMemRefType) -.def_prop_ro("tag_mem_ref_rank", &mlir::affine::AffineDmaStartOp::getTagMemRefRank) -.def_prop_ro("tag_map", &mlir::affine::AffineDmaStartOp::getTagMap) -.def_prop_ro("tag_map_attr", &mlir::affine::AffineDmaStartOp::getTagMapAttr) -.def_prop_ro("tag_indices", &mlir::affine::AffineDmaStartOp::getTagIndices) -.def_prop_ro("num_elements", &mlir::affine::AffineDmaStartOp::getNumElements) -.def("get_affine_map_attr_for_mem_ref", &mlir::affine::AffineDmaStartOp::getAffineMapAttrForMemRef, "memref"_a) -.def("is_dest_memory_space_faster", &mlir::affine::AffineDmaStartOp::isDestMemorySpaceFaster) -.def("is_src_memory_space_faster", &mlir::affine::AffineDmaStartOp::isSrcMemorySpaceFaster) -.def_prop_ro("faster_mem_pos", &mlir::affine::AffineDmaStartOp::getFasterMemPos) -.def("get_effects", &mlir::affine::AffineDmaStartOp::getEffects, "effects"_a) -.def_static("src_map_attr_str_name", &mlir::affine::AffineDmaStartOp::getSrcMapAttrStrName) -.def_static("dst_map_attr_str_name", &mlir::affine::AffineDmaStartOp::getDstMapAttrStrName) -.def_static("tag_map_attr_str_name", &mlir::affine::AffineDmaStartOp::getTagMapAttrStrName) -.def_static("operation_name", &mlir::affine::AffineDmaStartOp::getOperationName) -.def_static("parse", &mlir::affine::AffineDmaStartOp::parse, "parser"_a, "result"_a) -.def("print", &mlir::affine::AffineDmaStartOp::print, "p"_a) -.def("verify_invariants_impl", &mlir::affine::AffineDmaStartOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineDmaStartOp::verifyInvariants) -.def("fold", &mlir::affine::AffineDmaStartOp::fold, "cst_operands"_a, "results"_a) -.def("is_strided", &mlir::affine::AffineDmaStartOp::isStrided) -.def_prop_ro("stride", &mlir::affine::AffineDmaStartOp::getStride) -.def_prop_ro("num_elements_per_stride", &mlir::affine::AffineDmaStartOp::getNumElementsPerStride) -; - -auto mlir_affine_AffineDmaWaitOp = nb::class_(m, "AffineDmaWaitOp") -.def_static("attribute_names", &mlir::affine::AffineDmaWaitOp::getAttributeNames) -.def_static("build", &mlir::affine::AffineDmaWaitOp::build, "builder"_a, "result"_a, "tag_mem_ref"_a, "tag_map"_a, "tag_indices"_a, "num_elements"_a) -.def_static("operation_name", &mlir::affine::AffineDmaWaitOp::getOperationName) -.def_prop_ro("tag_mem_ref", &mlir::affine::AffineDmaWaitOp::getTagMemRef) -.def_prop_ro("tag_mem_ref_mutable", &mlir::affine::AffineDmaWaitOp::getTagMemRefMutable) -.def_prop_ro("tag_mem_ref_type", &mlir::affine::AffineDmaWaitOp::getTagMemRefType) -.def_prop_ro("tag_map", &mlir::affine::AffineDmaWaitOp::getTagMap) -.def_prop_ro("tag_map_attr", &mlir::affine::AffineDmaWaitOp::getTagMapAttr) -.def_prop_ro("tag_indices", &mlir::affine::AffineDmaWaitOp::getTagIndices) -.def_prop_ro("tag_mem_ref_rank", &mlir::affine::AffineDmaWaitOp::getTagMemRefRank) -.def("get_affine_map_attr_for_mem_ref", &mlir::affine::AffineDmaWaitOp::getAffineMapAttrForMemRef, "memref"_a) -.def_prop_ro("num_elements", &mlir::affine::AffineDmaWaitOp::getNumElements) -.def_static("tag_map_attr_str_name", &mlir::affine::AffineDmaWaitOp::getTagMapAttrStrName) -.def_static("parse", &mlir::affine::AffineDmaWaitOp::parse, "parser"_a, "result"_a) -.def("print", &mlir::affine::AffineDmaWaitOp::print, "p"_a) -.def("verify_invariants_impl", &mlir::affine::AffineDmaWaitOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineDmaWaitOp::verifyInvariants) -.def("fold", &mlir::affine::AffineDmaWaitOp::fold, "cst_operands"_a, "results"_a) -.def("get_effects", &mlir::affine::AffineDmaWaitOp::getEffects, "effects"_a) -; - -auto mlir_affine_AffineDialect = nb::class_(m, "AffineDialect") -.def_static("dialect_namespace", &mlir::affine::AffineDialect::getDialectNamespace) -.def("materialize_constant", &mlir::affine::AffineDialect::materializeConstant, "builder"_a, "value"_a, "type"_a, "loc"_a, nb::rv_policy::reference_internal) -.def_static("insert_into_registry", [](mlir::DialectRegistry ®istry) { registry.insert(); }) -.def_static("load_into_context", [](mlir::MLIRContext &context) { return context.getOrLoadDialect(); }) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineDialect__ = nb::class_>(m, "TypeIDResolver[affine::AffineDialect]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineDialect>::resolveTypeID) -; - -auto mlir_affine_detail_AffineApplyOpGenericAdaptorBase = nb::class_(m, "AffineApplyOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineApplyOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineApplyOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineApplyOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineApplyOpAdaptor = nb::class_(m, "AffineApplyOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineApplyOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineApplyOp = nb::class_(m, "AffineApplyOp") -.def_static("attribute_names", &mlir::affine::AffineApplyOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineApplyOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineApplyOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineApplyOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineApplyOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineApplyOp::getODSOperands, "index"_a) -.def_prop_ro("map_operands", &mlir::affine::AffineApplyOp::getMapOperands) -.def_prop_ro("map_operands_mutable", &mlir::affine::AffineApplyOp::getMapOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineApplyOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineApplyOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::affine::AffineApplyOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineApplyOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineApplyOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineApplyOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineApplyOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineApplyOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineApplyOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineApplyOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineApplyOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineApplyOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineApplyOp::getMap) -.def("set_map_attr", &mlir::affine::AffineApplyOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineApplyOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, llvm::ArrayRef exprList, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, exprList, mapOperands); }, "ods_builder"_a, "ods_state"_a, "expr_list"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type resultType0, mlir::AffineMapAttr map, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, resultType0, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMapAttr map, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::AffineMapAttr map, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, resultTypes, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type resultType0, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, resultType0, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, resultTypes, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineApplyOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineApplyOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffineApplyOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineApplyOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineApplyOp::verifyInvariants) -.def("verify", &mlir::affine::AffineApplyOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineApplyOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineApplyOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::affine::AffineApplyOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("get_effects", &mlir::affine::AffineApplyOp::getEffects, "effects"_a) -.def_prop_ro("affine_map", &mlir::affine::AffineApplyOp::getAffineMap) -.def_prop_ro("affine_value_map", &mlir::affine::AffineApplyOp::getAffineValueMap) -.def("is_valid_dim", [](mlir::affine::AffineApplyOp& self){ return self.isValidDim(); }) -.def("is_valid_dim", [](mlir::affine::AffineApplyOp& self, mlir::Region * region){ return self.isValidDim(region); }, "region"_a) -.def("is_valid_symbol", [](mlir::affine::AffineApplyOp& self){ return self.isValidSymbol(); }) -.def("is_valid_symbol", [](mlir::affine::AffineApplyOp& self, mlir::Region * region){ return self.isValidSymbol(region); }, "region"_a) -.def_prop_ro("dim_operands", &mlir::affine::AffineApplyOp::getDimOperands) -.def_prop_ro("symbol_operands", &mlir::affine::AffineApplyOp::getSymbolOperands) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineApplyOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineApplyOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineApplyOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineDelinearizeIndexOpGenericAdaptorBase = nb::class_(m, "AffineDelinearizeIndexOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::getAttributes) -.def_prop_ro("static_basis_attr", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::getStaticBasisAttr) -.def_prop_ro("static_basis", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::getStaticBasis) -; - -auto mlir_affine_detail_AffineDelinearizeIndexOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineDelinearizeIndexOpGenericAdaptorBase, "Properties") -.def_prop_ro("static_basis", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::Properties::getStaticBasis) -.def("set_static_basis", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::Properties::setStaticBasis, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineDelinearizeIndexOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineDelinearizeIndexOpAdaptor = nb::class_(m, "AffineDelinearizeIndexOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineDelinearizeIndexOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineDelinearizeIndexOp = nb::class_(m, "AffineDelinearizeIndexOp") -.def_static("attribute_names", &mlir::affine::AffineDelinearizeIndexOp::getAttributeNames) -.def_prop_ro("static_basis_attr_name", [](mlir::affine::AffineDelinearizeIndexOp& self){ return self.getStaticBasisAttrName(); }) -.def_static("get_static_basis_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineDelinearizeIndexOp::getStaticBasisAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineDelinearizeIndexOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineDelinearizeIndexOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineDelinearizeIndexOp::getODSOperands, "index"_a) -.def_prop_ro("linear_index", &mlir::affine::AffineDelinearizeIndexOp::getLinearIndex) -.def_prop_ro("dynamic_basis", &mlir::affine::AffineDelinearizeIndexOp::getDynamicBasis) -.def_prop_ro("linear_index_mutable", &mlir::affine::AffineDelinearizeIndexOp::getLinearIndexMutable) -.def_prop_ro("dynamic_basis_mutable", &mlir::affine::AffineDelinearizeIndexOp::getDynamicBasisMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineDelinearizeIndexOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineDelinearizeIndexOp::getODSResults, "index"_a) -.def_prop_ro("multi_index", &mlir::affine::AffineDelinearizeIndexOp::getMultiIndex) -.def_static("set_properties_from_attr", &mlir::affine::AffineDelinearizeIndexOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineDelinearizeIndexOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineDelinearizeIndexOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineDelinearizeIndexOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineDelinearizeIndexOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineDelinearizeIndexOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineDelinearizeIndexOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineDelinearizeIndexOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineDelinearizeIndexOp::writeProperties, "writer"_a) -.def_prop_ro("static_basis_attr", &mlir::affine::AffineDelinearizeIndexOp::getStaticBasisAttr) -.def_prop_ro("static_basis", &mlir::affine::AffineDelinearizeIndexOp::getStaticBasis) -.def("set_static_basis_attr", &mlir::affine::AffineDelinearizeIndexOp::setStaticBasisAttr, "attr"_a) -.def("set_static_basis", &mlir::affine::AffineDelinearizeIndexOp::setStaticBasis, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value linear_index, mlir::ValueRange dynamic_basis, ArrayRef static_asis, bool hasOuterBound){ return mlir::affine::AffineDelinearizeIndexOp::build(odsBuilder, odsState, linear_index, dynamic_basis, static_asis, hasOuterBound); }, "ods_builder"_a, "ods_state"_a, "linear_index"_a, "dynamic_basis"_a, "static_asis"_a, "has_outer_bound"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value linear_index, mlir::ValueRange basis, bool hasOuterBound){ return mlir::affine::AffineDelinearizeIndexOp::build(odsBuilder, odsState, linear_index, basis, hasOuterBound); }, "ods_builder"_a, "ods_state"_a, "linear_index"_a, "basis"_a, "has_outer_bound"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value linear_index, llvm::ArrayRef basis, bool hasOuterBound){ return mlir::affine::AffineDelinearizeIndexOp::build(odsBuilder, odsState, linear_index, basis, hasOuterBound); }, "ods_builder"_a, "ods_state"_a, "linear_index"_a, "basis"_a, "has_outer_bound"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value linear_index, ArrayRef basis, bool hasOuterBound){ return mlir::affine::AffineDelinearizeIndexOp::build(odsBuilder, odsState, linear_index, basis, hasOuterBound); }, "ods_builder"_a, "ods_state"_a, "linear_index"_a, "basis"_a, "has_outer_bound"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange multi_index, mlir::Value linear_index, mlir::ValueRange dynamic_basis, mlir::detail::DenseArrayAttrImpl static_basis){ return mlir::affine::AffineDelinearizeIndexOp::build(odsBuilder, odsState, multi_index, linear_index, dynamic_basis, static_basis); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "linear_index"_a, "dynamic_basis"_a, "static_basis"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange multi_index, mlir::Value linear_index, mlir::ValueRange dynamic_basis, ::llvm::ArrayRef static_basis){ return mlir::affine::AffineDelinearizeIndexOp::build(odsBuilder, odsState, multi_index, linear_index, dynamic_basis, static_basis); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "linear_index"_a, "dynamic_basis"_a, "static_basis"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineDelinearizeIndexOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::affine::AffineDelinearizeIndexOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineDelinearizeIndexOp::verifyInvariants) -.def("verify", &mlir::affine::AffineDelinearizeIndexOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineDelinearizeIndexOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineDelinearizeIndexOp::fold, "adaptor"_a, "results"_a) -.def_static("parse", &mlir::affine::AffineDelinearizeIndexOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::affine::AffineDelinearizeIndexOp::getEffects, "effects"_a) -.def("has_outer_bound", &mlir::affine::AffineDelinearizeIndexOp::hasOuterBound) -.def_prop_ro("mixed_basis", &mlir::affine::AffineDelinearizeIndexOp::getMixedBasis) -.def_prop_ro("effective_basis", &mlir::affine::AffineDelinearizeIndexOp::getEffectiveBasis) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineDelinearizeIndexOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineDelinearizeIndexOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineDelinearizeIndexOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineForOpGenericAdaptorBase = nb::class_(m, "AffineForOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getAttributes) -.def_prop_ro("lower_bound_map_attr", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getLowerBoundMapAttr) -.def_prop_ro("lower_bound_map", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getLowerBoundMap) -.def_prop_ro("upper_bound_map_attr", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getUpperBoundMapAttr) -.def_prop_ro("upper_bound_map", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getUpperBoundMap) -.def_prop_ro("step_attr", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getStepAttr) -.def_prop_ro("step", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getStep) -.def_prop_ro("region", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::affine::detail::AffineForOpGenericAdaptorBase::getRegions) -; - -auto mlir_affine_detail_AffineForOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineForOpGenericAdaptorBase, "Properties") -.def_prop_ro("lower_bound_map", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::getLowerBoundMap) -.def("set_lower_bound_map", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::setLowerBoundMap, "prop_value"_a) -.def_prop_ro("step", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::getStep) -.def("set_step", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::setStep, "prop_value"_a) -.def_prop_ro("upper_bound_map", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::getUpperBoundMap) -.def("set_upper_bound_map", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::setUpperBoundMap, "prop_value"_a) -.def_prop_ro("operand_segment_sizes", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::getOperandSegmentSizes) -.def("set_operand_segment_sizes", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::setOperandSegmentSizes, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineForOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineForOpAdaptor = nb::class_(m, "AffineForOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineForOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineForOp = nb::class_(m, "AffineForOp") -.def_static("attribute_names", &mlir::affine::AffineForOp::getAttributeNames) -.def_prop_ro("lower_bound_map_attr_name", [](mlir::affine::AffineForOp& self){ return self.getLowerBoundMapAttrName(); }) -.def_static("get_lower_bound_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineForOp::getLowerBoundMapAttrName(name); }, "name"_a) -.def_prop_ro("step_attr_name", [](mlir::affine::AffineForOp& self){ return self.getStepAttrName(); }) -.def_static("get_step_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineForOp::getStepAttrName(name); }, "name"_a) -.def_prop_ro("upper_bound_map_attr_name", [](mlir::affine::AffineForOp& self){ return self.getUpperBoundMapAttrName(); }) -.def_static("get_upper_bound_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineForOp::getUpperBoundMapAttrName(name); }, "name"_a) -.def_prop_ro("operand_segment_sizes_attr_name", [](mlir::affine::AffineForOp& self){ return self.getOperandSegmentSizesAttrName(); }) -.def_static("get_operand_segment_sizes_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineForOp::getOperandSegmentSizesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineForOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineForOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineForOp::getODSOperands, "index"_a) -.def_prop_ro("lower_bound_operands", &mlir::affine::AffineForOp::getLowerBoundOperands) -.def_prop_ro("upper_bound_operands", &mlir::affine::AffineForOp::getUpperBoundOperands) -.def_prop_ro("inits", &mlir::affine::AffineForOp::getInits) -.def_prop_ro("lower_bound_operands_mutable", &mlir::affine::AffineForOp::getLowerBoundOperandsMutable) -.def_prop_ro("upper_bound_operands_mutable", &mlir::affine::AffineForOp::getUpperBoundOperandsMutable) -.def_prop_ro("inits_mutable", &mlir::affine::AffineForOp::getInitsMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineForOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineForOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::affine::AffineForOp::getResults) -.def_prop_ro("region", &mlir::affine::AffineForOp::getRegion) -.def_static("set_properties_from_attr", &mlir::affine::AffineForOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineForOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineForOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineForOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineForOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineForOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineForOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineForOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineForOp::writeProperties, "writer"_a) -.def_prop_ro("lower_bound_map_attr", &mlir::affine::AffineForOp::getLowerBoundMapAttr) -.def_prop_ro("lower_bound_map", &mlir::affine::AffineForOp::getLowerBoundMap) -.def_prop_ro("upper_bound_map_attr", &mlir::affine::AffineForOp::getUpperBoundMapAttr) -.def_prop_ro("upper_bound_map", &mlir::affine::AffineForOp::getUpperBoundMap) -.def_prop_ro("step_attr", &mlir::affine::AffineForOp::getStepAttr) -.def_prop_ro("step", &mlir::affine::AffineForOp::getStep) -.def("set_lower_bound_map_attr", &mlir::affine::AffineForOp::setLowerBoundMapAttr, "attr"_a) -.def("set_lower_bound_map", &mlir::affine::AffineForOp::setLowerBoundMap, "attr_value"_a) -.def("set_upper_bound_map_attr", &mlir::affine::AffineForOp::setUpperBoundMapAttr, "attr"_a) -.def("set_upper_bound_map", &mlir::affine::AffineForOp::setUpperBoundMap, "attr_value"_a) -.def("set_step_attr", &mlir::affine::AffineForOp::setStepAttr, "attr"_a) -.def("set_step", [](mlir::affine::AffineForOp& self, llvm::APInt attrValue){ return self.setStep(attrValue); }, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, int64_t lowerBound, int64_t upperBound, int64_t step, mlir::ValueRange iterArgs, llvm::function_ref bodyBuilder){ return mlir::affine::AffineForOp::build(odsBuilder, odsState, lowerBound, upperBound, step, iterArgs, bodyBuilder); }, "ods_builder"_a, "ods_state"_a, "lower_bound"_a, "upper_bound"_a, "step"_a, "iter_args"_a, "body_builder"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange lbOperands, mlir::AffineMap lbMap, mlir::ValueRange ubOperands, mlir::AffineMap ubMap, int64_t step, mlir::ValueRange iterArgs, llvm::function_ref bodyBuilder){ return mlir::affine::AffineForOp::build(odsBuilder, odsState, lbOperands, lbMap, ubOperands, ubMap, step, iterArgs, bodyBuilder); }, "ods_builder"_a, "ods_state"_a, "lb_operands"_a, "lb_map"_a, "ub_operands"_a, "ub_map"_a, "step"_a, "iter_args"_a, "body_builder"_a) -.def_static("parse", &mlir::affine::AffineForOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineForOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineForOp::verifyInvariants) -.def("verify_regions", &mlir::affine::AffineForOp::verifyRegions) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineForOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineForOp::fold, "adaptor"_a, "results"_a) -.def_prop_ro("loop_regions", &mlir::affine::AffineForOp::getLoopRegions) -.def_prop_ro("loop_induction_vars", &mlir::affine::AffineForOp::getLoopInductionVars) -.def_prop_ro("loop_lower_bounds", &mlir::affine::AffineForOp::getLoopLowerBounds) -.def_prop_ro("loop_steps", &mlir::affine::AffineForOp::getLoopSteps) -.def_prop_ro("loop_upper_bounds", &mlir::affine::AffineForOp::getLoopUpperBounds) -.def_prop_ro("yielded_values_mutable", &mlir::affine::AffineForOp::getYieldedValuesMutable) -.def("replace_with_additional_yields", &mlir::affine::AffineForOp::replaceWithAdditionalYields, "rewriter"_a, "new_init_operands"_a, "replace_init_operand_uses_in_loop"_a, "new_yield_values_fn"_a) -.def("get_entry_successor_operands", &mlir::affine::AffineForOp::getEntrySuccessorOperands, "point"_a) -.def("get_successor_regions", &mlir::affine::AffineForOp::getSuccessorRegions, "point"_a, "regions"_a) -.def_prop_ro("induction_var", &mlir::affine::AffineForOp::getInductionVar) -.def_prop_ro("region_iter_args", &mlir::affine::AffineForOp::getRegionIterArgs) -.def_prop_ro("control_operands", &mlir::affine::AffineForOp::getControlOperands) -.def_prop_ro("lower_bound", &mlir::affine::AffineForOp::getLowerBound) -.def_prop_ro("upper_bound", &mlir::affine::AffineForOp::getUpperBound) -.def_prop_ro("step_as_int", &mlir::affine::AffineForOp::getStepAsInt) -.def("set_lower_bound", &mlir::affine::AffineForOp::setLowerBound, "operands"_a, "map"_a) -.def("set_upper_bound", &mlir::affine::AffineForOp::setUpperBound, "operands"_a, "map"_a) -.def("set_step", [](mlir::affine::AffineForOp& self, int64_t step){ return self.setStep(step); }, "step"_a) -.def_prop_ro("num_region_iter_args", &mlir::affine::AffineForOp::getNumRegionIterArgs) -.def_prop_ro("num_control_operands", &mlir::affine::AffineForOp::getNumControlOperands) -.def_prop_ro("num_iter_operands", &mlir::affine::AffineForOp::getNumIterOperands) -.def("has_constant_lower_bound", &mlir::affine::AffineForOp::hasConstantLowerBound) -.def("has_constant_upper_bound", &mlir::affine::AffineForOp::hasConstantUpperBound) -.def("has_constant_bounds", &mlir::affine::AffineForOp::hasConstantBounds) -.def_prop_ro("constant_lower_bound", &mlir::affine::AffineForOp::getConstantLowerBound) -.def_prop_ro("constant_upper_bound", &mlir::affine::AffineForOp::getConstantUpperBound) -.def("set_constant_lower_bound", &mlir::affine::AffineForOp::setConstantLowerBound, "value"_a) -.def("set_constant_upper_bound", &mlir::affine::AffineForOp::setConstantUpperBound, "value"_a) -.def("matching_bound_operand_list", &mlir::affine::AffineForOp::matchingBoundOperandList) -.def_prop_ro("speculatability", &mlir::affine::AffineForOp::getSpeculatability) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineForOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineForOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineForOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineIfOpGenericAdaptorBase = nb::class_(m, "AffineIfOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getAttributes) -.def_prop_ro("condition_attr", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getConditionAttr) -.def_prop_ro("condition", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getCondition) -.def_prop_ro("then_region", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getThenRegion) -.def_prop_ro("else_region", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getElseRegion) -.def_prop_ro("regions", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::getRegions) -; - -auto mlir_affine_detail_AffineIfOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineIfOpGenericAdaptorBase, "Properties") -.def_prop_ro("condition", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::Properties::getCondition) -.def("set_condition", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::Properties::setCondition, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineIfOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineIfOpAdaptor = nb::class_(m, "AffineIfOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineIfOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineIfOp = nb::class_(m, "AffineIfOp") -.def_static("attribute_names", &mlir::affine::AffineIfOp::getAttributeNames) -.def_prop_ro("condition_attr_name", [](mlir::affine::AffineIfOp& self){ return self.getConditionAttrName(); }) -.def_static("get_condition_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineIfOp::getConditionAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineIfOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineIfOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineIfOp::getODSOperands, "index"_a) -.def("get_ods_result_index_and_length", &mlir::affine::AffineIfOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineIfOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::affine::AffineIfOp::getResults) -.def_prop_ro("then_region", &mlir::affine::AffineIfOp::getThenRegion) -.def_prop_ro("else_region", &mlir::affine::AffineIfOp::getElseRegion) -.def_static("set_properties_from_attr", &mlir::affine::AffineIfOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineIfOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineIfOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineIfOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineIfOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineIfOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineIfOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineIfOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineIfOp::writeProperties, "writer"_a) -.def_prop_ro("condition_attr", &mlir::affine::AffineIfOp::getConditionAttr) -.def_prop_ro("condition", &mlir::affine::AffineIfOp::getCondition) -.def("set_condition_attr", &mlir::affine::AffineIfOp::setConditionAttr, "attr"_a) -.def("set_condition", &mlir::affine::AffineIfOp::setCondition, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::IntegerSet set, mlir::ValueRange args, bool withElseRegion){ return mlir::affine::AffineIfOp::build(odsBuilder, odsState, set, args, withElseRegion); }, "ods_builder"_a, "ods_state"_a, "set"_a, "args"_a, "with_else_region"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::IntegerSet set, mlir::ValueRange args, bool withElseRegion){ return mlir::affine::AffineIfOp::build(odsBuilder, odsState, resultTypes, set, args, withElseRegion); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "set"_a, "args"_a, "with_else_region"_a) -.def_static("parse", &mlir::affine::AffineIfOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineIfOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineIfOp::verifyInvariants) -.def("verify", &mlir::affine::AffineIfOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineIfOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineIfOp::fold, "adaptor"_a, "results"_a) -.def("get_successor_regions", &mlir::affine::AffineIfOp::getSuccessorRegions, "point"_a, "regions"_a) -.def_static("condition_attr_str_name", &mlir::affine::AffineIfOp::getConditionAttrStrName) -.def_prop_ro("integer_set", &mlir::affine::AffineIfOp::getIntegerSet) -.def("set_integer_set", &mlir::affine::AffineIfOp::setIntegerSet, "new_set"_a) -.def("set_conditional", &mlir::affine::AffineIfOp::setConditional, "set"_a, "operands"_a) -.def("has_else", &mlir::affine::AffineIfOp::hasElse) -.def_prop_ro("then_block", &mlir::affine::AffineIfOp::getThenBlock) -.def_prop_ro("else_block", &mlir::affine::AffineIfOp::getElseBlock) -.def_prop_ro("then_body_builder", &mlir::affine::AffineIfOp::getThenBodyBuilder) -.def_prop_ro("else_body_builder", &mlir::affine::AffineIfOp::getElseBodyBuilder) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineIfOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineIfOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineIfOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineLinearizeIndexOpGenericAdaptorBase = nb::class_(m, "AffineLinearizeIndexOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::getAttributes) -.def_prop_ro("disjoint", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::getDisjoint) -.def_prop_ro("static_basis_attr", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::getStaticBasisAttr) -.def_prop_ro("static_basis", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::getStaticBasis) -; - -auto mlir_affine_detail_AffineLinearizeIndexOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineLinearizeIndexOpGenericAdaptorBase, "Properties") -.def_prop_ro("static_basis", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::getStaticBasis) -.def("set_static_basis", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::setStaticBasis, "prop_value"_a) -.def_prop_ro("disjoint", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::getDisjoint) -.def("set_disjoint", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::setDisjoint, "prop_value"_a) -.def_prop_ro("operand_segment_sizes", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::getOperandSegmentSizes) -.def("set_operand_segment_sizes", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::setOperandSegmentSizes, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineLinearizeIndexOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineLinearizeIndexOpAdaptor = nb::class_(m, "AffineLinearizeIndexOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineLinearizeIndexOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineLinearizeIndexOp = nb::class_(m, "AffineLinearizeIndexOp") -.def_static("attribute_names", &mlir::affine::AffineLinearizeIndexOp::getAttributeNames) -.def_prop_ro("static_basis_attr_name", [](mlir::affine::AffineLinearizeIndexOp& self){ return self.getStaticBasisAttrName(); }) -.def_static("get_static_basis_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineLinearizeIndexOp::getStaticBasisAttrName(name); }, "name"_a) -.def_prop_ro("operand_segment_sizes_attr_name", [](mlir::affine::AffineLinearizeIndexOp& self){ return self.getOperandSegmentSizesAttrName(); }) -.def_static("get_operand_segment_sizes_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineLinearizeIndexOp::getOperandSegmentSizesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineLinearizeIndexOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineLinearizeIndexOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineLinearizeIndexOp::getODSOperands, "index"_a) -.def_prop_ro("multi_index", &mlir::affine::AffineLinearizeIndexOp::getMultiIndex) -.def_prop_ro("dynamic_basis", &mlir::affine::AffineLinearizeIndexOp::getDynamicBasis) -.def_prop_ro("multi_index_mutable", &mlir::affine::AffineLinearizeIndexOp::getMultiIndexMutable) -.def_prop_ro("dynamic_basis_mutable", &mlir::affine::AffineLinearizeIndexOp::getDynamicBasisMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineLinearizeIndexOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineLinearizeIndexOp::getODSResults, "index"_a) -.def_prop_ro("linear_index", &mlir::affine::AffineLinearizeIndexOp::getLinearIndex) -.def_static("set_properties_from_attr", &mlir::affine::AffineLinearizeIndexOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineLinearizeIndexOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineLinearizeIndexOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineLinearizeIndexOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineLinearizeIndexOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineLinearizeIndexOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineLinearizeIndexOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineLinearizeIndexOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineLinearizeIndexOp::writeProperties, "writer"_a) -.def_prop_ro("disjoint", &mlir::affine::AffineLinearizeIndexOp::getDisjoint) -.def("set_disjoint", &mlir::affine::AffineLinearizeIndexOp::setDisjoint, "new_disjoint"_a) -.def_prop_ro("static_basis_attr", &mlir::affine::AffineLinearizeIndexOp::getStaticBasisAttr) -.def_prop_ro("static_basis", &mlir::affine::AffineLinearizeIndexOp::getStaticBasis) -.def("set_static_basis_attr", &mlir::affine::AffineLinearizeIndexOp::setStaticBasisAttr, "attr"_a) -.def("set_static_basis", &mlir::affine::AffineLinearizeIndexOp::setStaticBasis, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange multi_index, mlir::ValueRange basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, multi_index, basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange multi_index, llvm::ArrayRef basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, multi_index, basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange multi_index, ArrayRef basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, multi_index, basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type linear_index, mlir::ValueRange multi_index, mlir::ValueRange dynamic_basis, mlir::detail::DenseArrayAttrImpl static_basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, linear_index, multi_index, dynamic_basis, static_basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "linear_index"_a, "multi_index"_a, "dynamic_basis"_a, "static_basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange multi_index, mlir::ValueRange dynamic_basis, mlir::detail::DenseArrayAttrImpl static_basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, multi_index, dynamic_basis, static_basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "dynamic_basis"_a, "static_basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange multi_index, mlir::ValueRange dynamic_basis, mlir::detail::DenseArrayAttrImpl static_basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, resultTypes, multi_index, dynamic_basis, static_basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "multi_index"_a, "dynamic_basis"_a, "static_basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type linear_index, mlir::ValueRange multi_index, mlir::ValueRange dynamic_basis, ::llvm::ArrayRef static_basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, linear_index, multi_index, dynamic_basis, static_basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "linear_index"_a, "multi_index"_a, "dynamic_basis"_a, "static_basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange multi_index, mlir::ValueRange dynamic_basis, ::llvm::ArrayRef static_basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, multi_index, dynamic_basis, static_basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "multi_index"_a, "dynamic_basis"_a, "static_basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange multi_index, mlir::ValueRange dynamic_basis, ::llvm::ArrayRef static_basis, bool disjoint){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, resultTypes, multi_index, dynamic_basis, static_basis, disjoint); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "multi_index"_a, "dynamic_basis"_a, "static_basis"_a, "disjoint"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineLinearizeIndexOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineLinearizeIndexOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::affine::AffineLinearizeIndexOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineLinearizeIndexOp::verifyInvariants) -.def("verify", &mlir::affine::AffineLinearizeIndexOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineLinearizeIndexOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineLinearizeIndexOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::affine::AffineLinearizeIndexOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::affine::AffineLinearizeIndexOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::affine::AffineLinearizeIndexOp::getEffects, "effects"_a) -.def("has_outer_bound", &mlir::affine::AffineLinearizeIndexOp::hasOuterBound) -.def_prop_ro("mixed_basis", &mlir::affine::AffineLinearizeIndexOp::getMixedBasis) -.def_prop_ro("effective_basis", &mlir::affine::AffineLinearizeIndexOp::getEffectiveBasis) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineLinearizeIndexOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineLinearizeIndexOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineLinearizeIndexOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineLoadOpGenericAdaptorBase = nb::class_(m, "AffineLoadOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineLoadOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineLoadOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineLoadOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineLoadOpAdaptor = nb::class_(m, "AffineLoadOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineLoadOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineLoadOp = nb::class_(m, "AffineLoadOp") -.def_static("attribute_names", &mlir::affine::AffineLoadOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineLoadOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineLoadOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineLoadOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineLoadOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineLoadOp::getODSOperands, "index"_a) -.def_prop_ro("memref", &mlir::affine::AffineLoadOp::getMemref) -.def_prop_ro("indices", &mlir::affine::AffineLoadOp::getIndices) -.def_prop_ro("memref_mutable", &mlir::affine::AffineLoadOp::getMemrefMutable) -.def_prop_ro("indices_mutable", &mlir::affine::AffineLoadOp::getIndicesMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineLoadOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineLoadOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::affine::AffineLoadOp::getResult) -.def_static("set_properties_from_attr", &mlir::affine::AffineLoadOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineLoadOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineLoadOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineLoadOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineLoadOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineLoadOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineLoadOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineLoadOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineLoadOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineLoadOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineLoadOp::getMap) -.def("set_map_attr", &mlir::affine::AffineLoadOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineLoadOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, map, operands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value memref, mlir::ValueRange indices){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, memref, indices); }, "ods_builder"_a, "ods_state"_a, "memref"_a, "indices"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value memref, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, memref, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "memref"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMapAttr map){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, result, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMapAttr map){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, resultTypes, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMap map){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, result, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMap map){ return mlir::affine::AffineLoadOp::build(odsBuilder, odsState, resultTypes, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineLoadOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffineLoadOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineLoadOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineLoadOp::verifyInvariants) -.def("verify", &mlir::affine::AffineLoadOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineLoadOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineLoadOp::fold, "adaptor"_a) -.def("get_effects", &mlir::affine::AffineLoadOp::getEffects, "effects"_a) -.def_prop_ro("mem_ref_operand_index", &mlir::affine::AffineLoadOp::getMemRefOperandIndex) -.def("set_mem_ref", &mlir::affine::AffineLoadOp::setMemRef, "value"_a) -.def_prop_ro("affine_map_attr", &mlir::affine::AffineLoadOp::getAffineMapAttr) -.def_static("map_attr_str_name", &mlir::affine::AffineLoadOp::getMapAttrStrName) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineLoadOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineLoadOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineLoadOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineMaxOpGenericAdaptorBase = nb::class_(m, "AffineMaxOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineMaxOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineMaxOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineMaxOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineMaxOpAdaptor = nb::class_(m, "AffineMaxOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineMaxOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineMaxOp = nb::class_(m, "AffineMaxOp") -.def_static("attribute_names", &mlir::affine::AffineMaxOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineMaxOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineMaxOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineMaxOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineMaxOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineMaxOp::getODSOperands, "index"_a) -.def_prop_ro("operands", &mlir::affine::AffineMaxOp::getOperands) -.def_prop_ro("operands_mutable", &mlir::affine::AffineMaxOp::getOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineMaxOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineMaxOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::affine::AffineMaxOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineMaxOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineMaxOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineMaxOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineMaxOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineMaxOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineMaxOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineMaxOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineMaxOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineMaxOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineMaxOp::getMap) -.def("set_map_attr", &mlir::affine::AffineMaxOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineMaxOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type resultType0, mlir::AffineMapAttr map, mlir::ValueRange operands){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, resultType0, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMapAttr map, mlir::ValueRange operands){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, map, operands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::AffineMapAttr map, mlir::ValueRange operands){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, resultTypes, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type resultType0, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, resultType0, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, map, operands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, resultTypes, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineMaxOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineMaxOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffineMaxOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineMaxOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineMaxOp::verifyInvariants) -.def("verify", &mlir::affine::AffineMaxOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineMaxOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineMaxOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::affine::AffineMaxOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("get_effects", &mlir::affine::AffineMaxOp::getEffects, "effects"_a) -.def_static("map_attr_str_name", &mlir::affine::AffineMaxOp::getMapAttrStrName) -.def_prop_ro("affine_map", &mlir::affine::AffineMaxOp::getAffineMap) -.def_prop_ro("map_operands", &mlir::affine::AffineMaxOp::getMapOperands) -.def_prop_ro("dim_operands", &mlir::affine::AffineMaxOp::getDimOperands) -.def_prop_ro("symbol_operands", &mlir::affine::AffineMaxOp::getSymbolOperands) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineMaxOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineMaxOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineMaxOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineMinOpGenericAdaptorBase = nb::class_(m, "AffineMinOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineMinOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineMinOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineMinOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineMinOpAdaptor = nb::class_(m, "AffineMinOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineMinOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineMinOp = nb::class_(m, "AffineMinOp") -.def_static("attribute_names", &mlir::affine::AffineMinOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineMinOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineMinOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineMinOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineMinOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineMinOp::getODSOperands, "index"_a) -.def_prop_ro("operands", &mlir::affine::AffineMinOp::getOperands) -.def_prop_ro("operands_mutable", &mlir::affine::AffineMinOp::getOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineMinOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineMinOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::affine::AffineMinOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineMinOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineMinOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineMinOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineMinOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineMinOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineMinOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineMinOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineMinOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineMinOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineMinOp::getMap) -.def("set_map_attr", &mlir::affine::AffineMinOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineMinOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type resultType0, mlir::AffineMapAttr map, mlir::ValueRange operands){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, resultType0, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMapAttr map, mlir::ValueRange operands){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, map, operands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::AffineMapAttr map, mlir::ValueRange operands){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, resultTypes, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type resultType0, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, resultType0, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, map, operands); }, "ods_builder"_a, "ods_state"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, resultTypes, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineMinOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineMinOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffineMinOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineMinOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineMinOp::verifyInvariants) -.def("verify", &mlir::affine::AffineMinOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineMinOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineMinOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::affine::AffineMinOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("get_effects", &mlir::affine::AffineMinOp::getEffects, "effects"_a) -.def_static("map_attr_str_name", &mlir::affine::AffineMinOp::getMapAttrStrName) -.def_prop_ro("affine_map", &mlir::affine::AffineMinOp::getAffineMap) -.def_prop_ro("map_operands", &mlir::affine::AffineMinOp::getMapOperands) -.def_prop_ro("dim_operands", &mlir::affine::AffineMinOp::getDimOperands) -.def_prop_ro("symbol_operands", &mlir::affine::AffineMinOp::getSymbolOperands) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineMinOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineMinOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineMinOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineParallelOpGenericAdaptorBase = nb::class_(m, "AffineParallelOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getAttributes) -.def_prop_ro("reductions_attr", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getReductionsAttr) -.def_prop_ro("reductions", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getReductions) -.def_prop_ro("lower_bounds_map_attr", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getLowerBoundsMapAttr) -.def_prop_ro("lower_bounds_map", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getLowerBoundsMap) -.def_prop_ro("lower_bounds_groups_attr", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getLowerBoundsGroupsAttr) -.def_prop_ro("lower_bounds_groups", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getLowerBoundsGroups) -.def_prop_ro("upper_bounds_map_attr", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getUpperBoundsMapAttr) -.def_prop_ro("upper_bounds_map", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getUpperBoundsMap) -.def_prop_ro("upper_bounds_groups_attr", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getUpperBoundsGroupsAttr) -.def_prop_ro("upper_bounds_groups", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getUpperBoundsGroups) -.def_prop_ro("steps_attr", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getStepsAttr) -.def_prop_ro("steps", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getSteps) -.def_prop_ro("region", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::getRegions) -; - -auto mlir_affine_detail_AffineParallelOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineParallelOpGenericAdaptorBase, "Properties") -.def_prop_ro("lower_bounds_groups", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::getLowerBoundsGroups) -.def("set_lower_bounds_groups", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::setLowerBoundsGroups, "prop_value"_a) -.def_prop_ro("lower_bounds_map", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::getLowerBoundsMap) -.def("set_lower_bounds_map", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::setLowerBoundsMap, "prop_value"_a) -.def_prop_ro("reductions", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::getReductions) -.def("set_reductions", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::setReductions, "prop_value"_a) -.def_prop_ro("steps", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::getSteps) -.def("set_steps", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::setSteps, "prop_value"_a) -.def_prop_ro("upper_bounds_groups", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::getUpperBoundsGroups) -.def("set_upper_bounds_groups", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::setUpperBoundsGroups, "prop_value"_a) -.def_prop_ro("upper_bounds_map", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::getUpperBoundsMap) -.def("set_upper_bounds_map", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::setUpperBoundsMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineParallelOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineParallelOpAdaptor = nb::class_(m, "AffineParallelOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineParallelOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineParallelOp = nb::class_(m, "AffineParallelOp") -.def_static("attribute_names", &mlir::affine::AffineParallelOp::getAttributeNames) -.def_prop_ro("lower_bounds_groups_attr_name", [](mlir::affine::AffineParallelOp& self){ return self.getLowerBoundsGroupsAttrName(); }) -.def_static("get_lower_bounds_groups_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineParallelOp::getLowerBoundsGroupsAttrName(name); }, "name"_a) -.def_prop_ro("lower_bounds_map_attr_name", [](mlir::affine::AffineParallelOp& self){ return self.getLowerBoundsMapAttrName(); }) -.def_static("get_lower_bounds_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineParallelOp::getLowerBoundsMapAttrName(name); }, "name"_a) -.def_prop_ro("reductions_attr_name", [](mlir::affine::AffineParallelOp& self){ return self.getReductionsAttrName(); }) -.def_static("get_reductions_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineParallelOp::getReductionsAttrName(name); }, "name"_a) -.def_prop_ro("steps_attr_name", [](mlir::affine::AffineParallelOp& self){ return self.getStepsAttrName(); }) -.def_static("get_steps_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineParallelOp::getStepsAttrName(name); }, "name"_a) -.def_prop_ro("upper_bounds_groups_attr_name", [](mlir::affine::AffineParallelOp& self){ return self.getUpperBoundsGroupsAttrName(); }) -.def_static("get_upper_bounds_groups_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineParallelOp::getUpperBoundsGroupsAttrName(name); }, "name"_a) -.def_prop_ro("upper_bounds_map_attr_name", [](mlir::affine::AffineParallelOp& self){ return self.getUpperBoundsMapAttrName(); }) -.def_static("get_upper_bounds_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineParallelOp::getUpperBoundsMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineParallelOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineParallelOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineParallelOp::getODSOperands, "index"_a) -.def_prop_ro("map_operands", &mlir::affine::AffineParallelOp::getMapOperands) -.def_prop_ro("map_operands_mutable", &mlir::affine::AffineParallelOp::getMapOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineParallelOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineParallelOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::affine::AffineParallelOp::getResults) -.def_prop_ro("region", &mlir::affine::AffineParallelOp::getRegion) -.def_static("set_properties_from_attr", &mlir::affine::AffineParallelOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineParallelOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineParallelOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineParallelOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineParallelOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineParallelOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineParallelOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineParallelOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineParallelOp::writeProperties, "writer"_a) -.def_prop_ro("reductions_attr", &mlir::affine::AffineParallelOp::getReductionsAttr) -.def_prop_ro("reductions", &mlir::affine::AffineParallelOp::getReductions) -.def_prop_ro("lower_bounds_map_attr", &mlir::affine::AffineParallelOp::getLowerBoundsMapAttr) -.def_prop_ro("lower_bounds_map", &mlir::affine::AffineParallelOp::getLowerBoundsMap) -.def_prop_ro("lower_bounds_groups_attr", &mlir::affine::AffineParallelOp::getLowerBoundsGroupsAttr) -.def_prop_ro("lower_bounds_groups", &mlir::affine::AffineParallelOp::getLowerBoundsGroups) -.def_prop_ro("upper_bounds_map_attr", &mlir::affine::AffineParallelOp::getUpperBoundsMapAttr) -.def_prop_ro("upper_bounds_map", &mlir::affine::AffineParallelOp::getUpperBoundsMap) -.def_prop_ro("upper_bounds_groups_attr", &mlir::affine::AffineParallelOp::getUpperBoundsGroupsAttr) -.def_prop_ro("upper_bounds_groups", &mlir::affine::AffineParallelOp::getUpperBoundsGroups) -.def_prop_ro("steps_attr", &mlir::affine::AffineParallelOp::getStepsAttr) -.def_prop_ro("steps", &mlir::affine::AffineParallelOp::getSteps) -.def("set_reductions_attr", &mlir::affine::AffineParallelOp::setReductionsAttr, "attr"_a) -.def("set_lower_bounds_map_attr", &mlir::affine::AffineParallelOp::setLowerBoundsMapAttr, "attr"_a) -.def("set_lower_bounds_map", &mlir::affine::AffineParallelOp::setLowerBoundsMap, "attr_value"_a) -.def("set_lower_bounds_groups_attr", &mlir::affine::AffineParallelOp::setLowerBoundsGroupsAttr, "attr"_a) -.def("set_upper_bounds_map_attr", &mlir::affine::AffineParallelOp::setUpperBoundsMapAttr, "attr"_a) -.def("set_upper_bounds_map", &mlir::affine::AffineParallelOp::setUpperBoundsMap, "attr_value"_a) -.def("set_upper_bounds_groups_attr", &mlir::affine::AffineParallelOp::setUpperBoundsGroupsAttr, "attr"_a) -.def("set_steps_attr", &mlir::affine::AffineParallelOp::setStepsAttr, "attr"_a) -.def("set_steps", [](mlir::affine::AffineParallelOp& self, ::llvm::SmallVector attrValue){ return self.setSteps(attrValue); }, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, llvm::ArrayRef reductions, ArrayRef ranges){ return mlir::affine::AffineParallelOp::build(odsBuilder, odsState, resultTypes, reductions, ranges); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "reductions"_a, "ranges"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, llvm::ArrayRef reductions, llvm::ArrayRef lbMaps, mlir::ValueRange lbArgs, llvm::ArrayRef ubMaps, mlir::ValueRange ubArgs, ArrayRef steps){ return mlir::affine::AffineParallelOp::build(odsBuilder, odsState, resultTypes, reductions, lbMaps, lbArgs, ubMaps, ubArgs, steps); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "reductions"_a, "lb_maps"_a, "lb_args"_a, "ub_maps"_a, "ub_args"_a, "steps"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange results, mlir::ArrayAttr reductions, mlir::AffineMapAttr lowerBoundsMap, mlir::DenseIntElementsAttr lowerBoundsGroups, mlir::AffineMapAttr upperBoundsMap, mlir::DenseIntElementsAttr upperBoundsGroups, mlir::ArrayAttr steps, mlir::ValueRange mapOperands){ return mlir::affine::AffineParallelOp::build(odsBuilder, odsState, results, reductions, lowerBoundsMap, lowerBoundsGroups, upperBoundsMap, upperBoundsGroups, steps, mapOperands); }, "ods_builder"_a, "ods_state"_a, "results"_a, "reductions"_a, "lower_bounds_map"_a, "lower_bounds_groups"_a, "upper_bounds_map"_a, "upper_bounds_groups"_a, "steps"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange results, mlir::ArrayAttr reductions, mlir::AffineMap lowerBoundsMap, mlir::DenseIntElementsAttr lowerBoundsGroups, mlir::AffineMap upperBoundsMap, mlir::DenseIntElementsAttr upperBoundsGroups, ::llvm::SmallVector steps, mlir::ValueRange mapOperands){ return mlir::affine::AffineParallelOp::build(odsBuilder, odsState, results, reductions, lowerBoundsMap, lowerBoundsGroups, upperBoundsMap, upperBoundsGroups, steps, mapOperands); }, "ods_builder"_a, "ods_state"_a, "results"_a, "reductions"_a, "lower_bounds_map"_a, "lower_bounds_groups"_a, "upper_bounds_map"_a, "upper_bounds_groups"_a, "steps"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineParallelOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffineParallelOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineParallelOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineParallelOp::verifyInvariants) -.def("verify", &mlir::affine::AffineParallelOp::verify) -.def("fold", &mlir::affine::AffineParallelOp::fold, "adaptor"_a, "results"_a) -.def_prop_ro("loop_regions", &mlir::affine::AffineParallelOp::getLoopRegions) -.def_prop_ro("num_dims", &mlir::affine::AffineParallelOp::getNumDims) -.def_prop_ro("constant_ranges", &mlir::affine::AffineParallelOp::getConstantRanges) -.def_prop_ro("body", &mlir::affine::AffineParallelOp::getBody) -.def_prop_ro("body_builder", &mlir::affine::AffineParallelOp::getBodyBuilder) -.def_prop_ro("i_vs", &mlir::affine::AffineParallelOp::getIVs) -.def("get_lower_bound_map", &mlir::affine::AffineParallelOp::getLowerBoundMap, "pos"_a) -.def_prop_ro("lower_bounds_operands", &mlir::affine::AffineParallelOp::getLowerBoundsOperands) -.def_prop_ro("lower_bounds_value_map", &mlir::affine::AffineParallelOp::getLowerBoundsValueMap) -.def("set_lower_bounds", &mlir::affine::AffineParallelOp::setLowerBounds, "operands"_a, "map"_a) -.def("get_upper_bound_map", &mlir::affine::AffineParallelOp::getUpperBoundMap, "pos"_a) -.def_prop_ro("upper_bounds_operands", &mlir::affine::AffineParallelOp::getUpperBoundsOperands) -.def_prop_ro("upper_bounds_value_map", &mlir::affine::AffineParallelOp::getUpperBoundsValueMap) -.def("set_upper_bounds", &mlir::affine::AffineParallelOp::setUpperBounds, "operands"_a, "map"_a) -.def("set_steps", [](mlir::affine::AffineParallelOp& self, ArrayRef newSteps){ return self.setSteps(newSteps); }, "new_steps"_a) -.def_static("reductions_attr_str_name", &mlir::affine::AffineParallelOp::getReductionsAttrStrName) -.def_static("lower_bounds_map_attr_str_name", &mlir::affine::AffineParallelOp::getLowerBoundsMapAttrStrName) -.def_static("lower_bounds_groups_attr_str_name", &mlir::affine::AffineParallelOp::getLowerBoundsGroupsAttrStrName) -.def_static("upper_bounds_map_attr_str_name", &mlir::affine::AffineParallelOp::getUpperBoundsMapAttrStrName) -.def_static("upper_bounds_groups_attr_str_name", &mlir::affine::AffineParallelOp::getUpperBoundsGroupsAttrStrName) -.def_static("steps_attr_str_name", &mlir::affine::AffineParallelOp::getStepsAttrStrName) -.def("has_min_max_bounds", &mlir::affine::AffineParallelOp::hasMinMaxBounds) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineParallelOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineParallelOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineParallelOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffinePrefetchOpGenericAdaptorBase = nb::class_(m, "AffinePrefetchOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getAttributes) -.def_prop_ro("is_write_attr", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getIsWriteAttr) -.def_prop_ro("is_write", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getIsWrite) -.def_prop_ro("locality_hint_attr", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getLocalityHintAttr) -.def_prop_ro("locality_hint", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getLocalityHint) -.def_prop_ro("is_data_cache_attr", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getIsDataCacheAttr) -.def_prop_ro("is_data_cache", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getIsDataCache) -.def_prop_ro("map_attr", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffinePrefetchOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffinePrefetchOpGenericAdaptorBase, "Properties") -.def_prop_ro("is_data_cache", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::getIsDataCache) -.def("set_is_data_cache", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::setIsDataCache, "prop_value"_a) -.def_prop_ro("is_write", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::getIsWrite) -.def("set_is_write", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::setIsWrite, "prop_value"_a) -.def_prop_ro("locality_hint", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::getLocalityHint) -.def("set_locality_hint", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::setLocalityHint, "prop_value"_a) -.def_prop_ro("map", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffinePrefetchOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffinePrefetchOpAdaptor = nb::class_(m, "AffinePrefetchOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffinePrefetchOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffinePrefetchOp = nb::class_(m, "AffinePrefetchOp") -.def_static("attribute_names", &mlir::affine::AffinePrefetchOp::getAttributeNames) -.def_prop_ro("is_data_cache_attr_name", [](mlir::affine::AffinePrefetchOp& self){ return self.getIsDataCacheAttrName(); }) -.def_static("get_is_data_cache_attr_name", [](mlir::OperationName name){ return mlir::affine::AffinePrefetchOp::getIsDataCacheAttrName(name); }, "name"_a) -.def_prop_ro("is_write_attr_name", [](mlir::affine::AffinePrefetchOp& self){ return self.getIsWriteAttrName(); }) -.def_static("get_is_write_attr_name", [](mlir::OperationName name){ return mlir::affine::AffinePrefetchOp::getIsWriteAttrName(name); }, "name"_a) -.def_prop_ro("locality_hint_attr_name", [](mlir::affine::AffinePrefetchOp& self){ return self.getLocalityHintAttrName(); }) -.def_static("get_locality_hint_attr_name", [](mlir::OperationName name){ return mlir::affine::AffinePrefetchOp::getLocalityHintAttrName(name); }, "name"_a) -.def_prop_ro("map_attr_name", [](mlir::affine::AffinePrefetchOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffinePrefetchOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffinePrefetchOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffinePrefetchOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffinePrefetchOp::getODSOperands, "index"_a) -.def_prop_ro("memref", &mlir::affine::AffinePrefetchOp::getMemref) -.def_prop_ro("indices", &mlir::affine::AffinePrefetchOp::getIndices) -.def_prop_ro("memref_mutable", &mlir::affine::AffinePrefetchOp::getMemrefMutable) -.def_prop_ro("indices_mutable", &mlir::affine::AffinePrefetchOp::getIndicesMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffinePrefetchOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffinePrefetchOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::affine::AffinePrefetchOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffinePrefetchOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffinePrefetchOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffinePrefetchOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffinePrefetchOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffinePrefetchOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffinePrefetchOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffinePrefetchOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffinePrefetchOp::writeProperties, "writer"_a) -.def_prop_ro("is_write_attr", &mlir::affine::AffinePrefetchOp::getIsWriteAttr) -.def_prop_ro("is_write", &mlir::affine::AffinePrefetchOp::getIsWrite) -.def_prop_ro("locality_hint_attr", &mlir::affine::AffinePrefetchOp::getLocalityHintAttr) -.def_prop_ro("locality_hint", &mlir::affine::AffinePrefetchOp::getLocalityHint) -.def_prop_ro("is_data_cache_attr", &mlir::affine::AffinePrefetchOp::getIsDataCacheAttr) -.def_prop_ro("is_data_cache", &mlir::affine::AffinePrefetchOp::getIsDataCache) -.def_prop_ro("map_attr", &mlir::affine::AffinePrefetchOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffinePrefetchOp::getMap) -.def("set_is_write_attr", &mlir::affine::AffinePrefetchOp::setIsWriteAttr, "attr"_a) -.def("set_is_write", &mlir::affine::AffinePrefetchOp::setIsWrite, "attr_value"_a) -.def("set_locality_hint_attr", &mlir::affine::AffinePrefetchOp::setLocalityHintAttr, "attr"_a) -.def("set_locality_hint", &mlir::affine::AffinePrefetchOp::setLocalityHint, "attr_value"_a) -.def("set_is_data_cache_attr", &mlir::affine::AffinePrefetchOp::setIsDataCacheAttr, "attr"_a) -.def("set_is_data_cache", &mlir::affine::AffinePrefetchOp::setIsDataCache, "attr_value"_a) -.def("set_map_attr", &mlir::affine::AffinePrefetchOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffinePrefetchOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value memref, mlir::AffineMap map, llvm::ArrayRef mapOperands, bool isWrite, unsigned int localityHint, bool isDataCache){ return mlir::affine::AffinePrefetchOp::build(odsBuilder, odsState, memref, map, mapOperands, isWrite, localityHint, isDataCache); }, "ods_builder"_a, "ods_state"_a, "memref"_a, "map"_a, "map_operands"_a, "is_write"_a, "locality_hint"_a, "is_data_cache"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value memref, mlir::ValueRange indices, mlir::BoolAttr isWrite, mlir::IntegerAttr localityHint, mlir::BoolAttr isDataCache, mlir::AffineMapAttr map){ return mlir::affine::AffinePrefetchOp::build(odsBuilder, odsState, memref, indices, isWrite, localityHint, isDataCache, map); }, "ods_builder"_a, "ods_state"_a, "memref"_a, "indices"_a, "is_write"_a, "locality_hint"_a, "is_data_cache"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value memref, mlir::ValueRange indices, mlir::BoolAttr isWrite, mlir::IntegerAttr localityHint, mlir::BoolAttr isDataCache, mlir::AffineMapAttr map){ return mlir::affine::AffinePrefetchOp::build(odsBuilder, odsState, resultTypes, memref, indices, isWrite, localityHint, isDataCache, map); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "memref"_a, "indices"_a, "is_write"_a, "locality_hint"_a, "is_data_cache"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value memref, mlir::ValueRange indices, bool isWrite, uint32_t localityHint, bool isDataCache, mlir::AffineMap map){ return mlir::affine::AffinePrefetchOp::build(odsBuilder, odsState, memref, indices, isWrite, localityHint, isDataCache, map); }, "ods_builder"_a, "ods_state"_a, "memref"_a, "indices"_a, "is_write"_a, "locality_hint"_a, "is_data_cache"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value memref, mlir::ValueRange indices, bool isWrite, uint32_t localityHint, bool isDataCache, mlir::AffineMap map){ return mlir::affine::AffinePrefetchOp::build(odsBuilder, odsState, resultTypes, memref, indices, isWrite, localityHint, isDataCache, map); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "memref"_a, "indices"_a, "is_write"_a, "locality_hint"_a, "is_data_cache"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffinePrefetchOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffinePrefetchOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffinePrefetchOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffinePrefetchOp::verifyInvariants) -.def("verify", &mlir::affine::AffinePrefetchOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffinePrefetchOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffinePrefetchOp::fold, "adaptor"_a, "results"_a) -.def_prop_ro("mem_ref_type", &mlir::affine::AffinePrefetchOp::getMemRefType) -.def_prop_ro("affine_map", &mlir::affine::AffinePrefetchOp::getAffineMap) -.def_prop_ro("affine_map_attr", &mlir::affine::AffinePrefetchOp::getAffineMapAttr) -.def("get_affine_map_attr_for_mem_ref", &mlir::affine::AffinePrefetchOp::getAffineMapAttrForMemRef, "mref"_a) -.def_prop_ro("map_operands", &mlir::affine::AffinePrefetchOp::getMapOperands) -.def_static("map_attr_str_name", &mlir::affine::AffinePrefetchOp::getMapAttrStrName) -.def_static("locality_hint_attr_str_name", &mlir::affine::AffinePrefetchOp::getLocalityHintAttrStrName) -.def_static("is_write_attr_str_name", &mlir::affine::AffinePrefetchOp::getIsWriteAttrStrName) -.def_static("is_data_cache_attr_str_name", &mlir::affine::AffinePrefetchOp::getIsDataCacheAttrStrName) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffinePrefetchOp__ = nb::class_>(m, "TypeIDResolver[affine::AffinePrefetchOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffinePrefetchOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineStoreOpGenericAdaptorBase = nb::class_(m, "AffineStoreOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineStoreOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineStoreOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineStoreOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineStoreOpAdaptor = nb::class_(m, "AffineStoreOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineStoreOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineStoreOp = nb::class_(m, "AffineStoreOp") -.def_static("attribute_names", &mlir::affine::AffineStoreOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineStoreOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineStoreOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineStoreOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineStoreOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineStoreOp::getODSOperands, "index"_a) -.def_prop_ro("value", &mlir::affine::AffineStoreOp::getValue) -.def_prop_ro("memref", &mlir::affine::AffineStoreOp::getMemref) -.def_prop_ro("indices", &mlir::affine::AffineStoreOp::getIndices) -.def_prop_ro("value_mutable", &mlir::affine::AffineStoreOp::getValueMutable) -.def_prop_ro("memref_mutable", &mlir::affine::AffineStoreOp::getMemrefMutable) -.def_prop_ro("indices_mutable", &mlir::affine::AffineStoreOp::getIndicesMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineStoreOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineStoreOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::affine::AffineStoreOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineStoreOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineStoreOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineStoreOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineStoreOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineStoreOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineStoreOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineStoreOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineStoreOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineStoreOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineStoreOp::getMap) -.def("set_map_attr", &mlir::affine::AffineStoreOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineStoreOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value valueToStore, mlir::Value memref, mlir::ValueRange indices){ return mlir::affine::AffineStoreOp::build(odsBuilder, odsState, valueToStore, memref, indices); }, "ods_builder"_a, "ods_state"_a, "value_to_store"_a, "memref"_a, "indices"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value valueToStore, mlir::Value memref, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineStoreOp::build(odsBuilder, odsState, valueToStore, memref, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "value_to_store"_a, "memref"_a, "map"_a, "map_operands"_a) -.def_static("parse", &mlir::affine::AffineStoreOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineStoreOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineStoreOp::verifyInvariants) -.def("verify", &mlir::affine::AffineStoreOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineStoreOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::affine::AffineStoreOp::fold, "adaptor"_a, "results"_a) -.def("get_effects", &mlir::affine::AffineStoreOp::getEffects, "effects"_a) -.def_prop_ro("stored_val_operand_index", &mlir::affine::AffineStoreOp::getStoredValOperandIndex) -.def_prop_ro("mem_ref_operand_index", &mlir::affine::AffineStoreOp::getMemRefOperandIndex) -.def("set_mem_ref", &mlir::affine::AffineStoreOp::setMemRef, "value"_a) -.def_prop_ro("affine_map_attr", &mlir::affine::AffineStoreOp::getAffineMapAttr) -.def_static("map_attr_str_name", &mlir::affine::AffineStoreOp::getMapAttrStrName) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineStoreOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineStoreOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineStoreOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineVectorLoadOpGenericAdaptorBase = nb::class_(m, "AffineVectorLoadOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineVectorLoadOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineVectorLoadOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineVectorLoadOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineVectorLoadOpAdaptor = nb::class_(m, "AffineVectorLoadOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineVectorLoadOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineVectorLoadOp = nb::class_(m, "AffineVectorLoadOp") -.def_static("attribute_names", &mlir::affine::AffineVectorLoadOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineVectorLoadOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineVectorLoadOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineVectorLoadOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineVectorLoadOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineVectorLoadOp::getODSOperands, "index"_a) -.def_prop_ro("memref", &mlir::affine::AffineVectorLoadOp::getMemref) -.def_prop_ro("indices", &mlir::affine::AffineVectorLoadOp::getIndices) -.def_prop_ro("memref_mutable", &mlir::affine::AffineVectorLoadOp::getMemrefMutable) -.def_prop_ro("indices_mutable", &mlir::affine::AffineVectorLoadOp::getIndicesMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineVectorLoadOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineVectorLoadOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::affine::AffineVectorLoadOp::getResult) -.def_static("set_properties_from_attr", &mlir::affine::AffineVectorLoadOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineVectorLoadOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineVectorLoadOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineVectorLoadOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineVectorLoadOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineVectorLoadOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineVectorLoadOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineVectorLoadOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineVectorLoadOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineVectorLoadOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineVectorLoadOp::getMap) -.def("set_map_attr", &mlir::affine::AffineVectorLoadOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineVectorLoadOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::VectorType resultType, mlir::AffineMap map, mlir::ValueRange operands){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, resultType, map, operands); }, "ods_builder"_a, "ods_state"_a, "result_type"_a, "map"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::VectorType resultType, mlir::Value memref, mlir::ValueRange indices){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, resultType, memref, indices); }, "ods_builder"_a, "ods_state"_a, "result_type"_a, "memref"_a, "indices"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::VectorType resultType, mlir::Value memref, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, resultType, memref, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "result_type"_a, "memref"_a, "map"_a, "map_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMapAttr map){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, result, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMapAttr map){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, resultTypes, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMap map){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, result, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value memref, mlir::ValueRange indices, mlir::AffineMap map){ return mlir::affine::AffineVectorLoadOp::build(odsBuilder, odsState, resultTypes, memref, indices, map); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "memref"_a, "indices"_a, "map"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineVectorLoadOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::affine::AffineVectorLoadOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineVectorLoadOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineVectorLoadOp::verifyInvariants) -.def("verify", &mlir::affine::AffineVectorLoadOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineVectorLoadOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_effects", &mlir::affine::AffineVectorLoadOp::getEffects, "effects"_a) -.def_prop_ro("mem_ref_operand_index", &mlir::affine::AffineVectorLoadOp::getMemRefOperandIndex) -.def("set_mem_ref", &mlir::affine::AffineVectorLoadOp::setMemRef, "value"_a) -.def_prop_ro("affine_map_attr", &mlir::affine::AffineVectorLoadOp::getAffineMapAttr) -.def_static("map_attr_str_name", &mlir::affine::AffineVectorLoadOp::getMapAttrStrName) -.def_prop_ro("vector_type", &mlir::affine::AffineVectorLoadOp::getVectorType) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineVectorLoadOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineVectorLoadOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineVectorLoadOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineVectorStoreOpGenericAdaptorBase = nb::class_(m, "AffineVectorStoreOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::getAttributes) -.def_prop_ro("map_attr", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::getMapAttr) -.def_prop_ro("map", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::getMap) -; - -auto mlir_affine_detail_AffineVectorStoreOpGenericAdaptorBase_Properties = nb::class_(mlir_affine_detail_AffineVectorStoreOpGenericAdaptorBase, "Properties") -.def_prop_ro("map", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::Properties::getMap) -.def("set_map", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::Properties::setMap, "prop_value"_a) -.def("__eq__", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::affine::detail::AffineVectorStoreOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_affine_AffineVectorStoreOpAdaptor = nb::class_(m, "AffineVectorStoreOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineVectorStoreOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineVectorStoreOp = nb::class_(m, "AffineVectorStoreOp") -.def_static("attribute_names", &mlir::affine::AffineVectorStoreOp::getAttributeNames) -.def_prop_ro("map_attr_name", [](mlir::affine::AffineVectorStoreOp& self){ return self.getMapAttrName(); }) -.def_static("get_map_attr_name", [](mlir::OperationName name){ return mlir::affine::AffineVectorStoreOp::getMapAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::affine::AffineVectorStoreOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineVectorStoreOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineVectorStoreOp::getODSOperands, "index"_a) -.def_prop_ro("value", &mlir::affine::AffineVectorStoreOp::getValue) -.def_prop_ro("memref", &mlir::affine::AffineVectorStoreOp::getMemref) -.def_prop_ro("indices", &mlir::affine::AffineVectorStoreOp::getIndices) -.def_prop_ro("value_mutable", &mlir::affine::AffineVectorStoreOp::getValueMutable) -.def_prop_ro("memref_mutable", &mlir::affine::AffineVectorStoreOp::getMemrefMutable) -.def_prop_ro("indices_mutable", &mlir::affine::AffineVectorStoreOp::getIndicesMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineVectorStoreOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineVectorStoreOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::affine::AffineVectorStoreOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::affine::AffineVectorStoreOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::affine::AffineVectorStoreOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::affine::AffineVectorStoreOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::affine::AffineVectorStoreOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::affine::AffineVectorStoreOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::affine::AffineVectorStoreOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::affine::AffineVectorStoreOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::affine::AffineVectorStoreOp::writeProperties, "writer"_a) -.def_prop_ro("map_attr", &mlir::affine::AffineVectorStoreOp::getMapAttr) -.def_prop_ro("map", &mlir::affine::AffineVectorStoreOp::getMap) -.def("set_map_attr", &mlir::affine::AffineVectorStoreOp::setMapAttr, "attr"_a) -.def("set_map", &mlir::affine::AffineVectorStoreOp::setMap, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value valueToStore, mlir::Value memref, mlir::ValueRange indices){ return mlir::affine::AffineVectorStoreOp::build(odsBuilder, odsState, valueToStore, memref, indices); }, "ods_builder"_a, "ods_state"_a, "value_to_store"_a, "memref"_a, "indices"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value valueToStore, mlir::Value memref, mlir::AffineMap map, mlir::ValueRange mapOperands){ return mlir::affine::AffineVectorStoreOp::build(odsBuilder, odsState, valueToStore, memref, map, mapOperands); }, "ods_builder"_a, "ods_state"_a, "value_to_store"_a, "memref"_a, "map"_a, "map_operands"_a) -.def_static("parse", &mlir::affine::AffineVectorStoreOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::affine::AffineVectorStoreOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineVectorStoreOp::verifyInvariants) -.def("verify", &mlir::affine::AffineVectorStoreOp::verify) -.def_static("get_canonicalization_patterns", &mlir::affine::AffineVectorStoreOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_effects", &mlir::affine::AffineVectorStoreOp::getEffects, "effects"_a) -.def_prop_ro("stored_val_operand_index", &mlir::affine::AffineVectorStoreOp::getStoredValOperandIndex) -.def_prop_ro("mem_ref_operand_index", &mlir::affine::AffineVectorStoreOp::getMemRefOperandIndex) -.def("set_mem_ref", &mlir::affine::AffineVectorStoreOp::setMemRef, "value"_a) -.def_prop_ro("affine_map_attr", &mlir::affine::AffineVectorStoreOp::getAffineMapAttr) -.def_static("map_attr_str_name", &mlir::affine::AffineVectorStoreOp::getMapAttrStrName) -.def_prop_ro("vector_type", &mlir::affine::AffineVectorStoreOp::getVectorType) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineVectorStoreOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineVectorStoreOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineVectorStoreOp>::resolveTypeID) -; - -auto mlir_affine_detail_AffineYieldOpGenericAdaptorBase = nb::class_(m, "AffineYieldOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::affine::detail::AffineYieldOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::affine::detail::AffineYieldOpGenericAdaptorBase::getAttributes) -; - -auto mlir_affine_AffineYieldOpAdaptor = nb::class_(m, "AffineYieldOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::affine::AffineYieldOpAdaptor::verify, "loc"_a) -; - -auto mlir_affine_AffineYieldOp = nb::class_(m, "AffineYieldOp") -.def_static("attribute_names", &mlir::affine::AffineYieldOp::getAttributeNames) -.def_static("operation_name", &mlir::affine::AffineYieldOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::affine::AffineYieldOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::affine::AffineYieldOp::getODSOperands, "index"_a) -.def_prop_ro("operands", &mlir::affine::AffineYieldOp::getOperands) -.def_prop_ro("operands_mutable", &mlir::affine::AffineYieldOp::getOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::affine::AffineYieldOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::affine::AffineYieldOp::getODSResults, "index"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState){ return mlir::affine::AffineYieldOp::build(odsBuilder, odsState); }, "ods_builder"_a, "ods_state"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands){ return mlir::affine::AffineYieldOp::build(odsBuilder, odsState, operands); }, "ods_builder"_a, "ods_state"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::affine::AffineYieldOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::affine::AffineYieldOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::affine::AffineYieldOp::verifyInvariants) -.def("verify", &mlir::affine::AffineYieldOp::verify) -.def("get_mutable_successor_operands", &mlir::affine::AffineYieldOp::getMutableSuccessorOperands, "point"_a) -.def_static("parse", &mlir::affine::AffineYieldOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::affine::AffineYieldOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_affine_AffineYieldOp__ = nb::class_>(m, "TypeIDResolver[affine::AffineYieldOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::affine::AffineYieldOp>::resolveTypeID) -; - -auto mlir_affine_AffineBound = nb::class_(m, "AffineBound") -.def_prop_ro("affine_for_op", &mlir::affine::AffineBound::getAffineForOp) -.def_prop_ro("map", &mlir::affine::AffineBound::getMap) -.def_prop_ro("num_operands", &mlir::affine::AffineBound::getNumOperands) -.def("get_operand", &mlir::affine::AffineBound::getOperand, "idx"_a) -.def("operand_begin", &mlir::affine::AffineBound::operandBegin) -.def("operand_end", &mlir::affine::AffineBound::operandEnd) -.def_prop_ro("operands", &mlir::affine::AffineBound::getOperands) -; - -} diff --git a/projects/eudsl-py/src/arith.cpp b/projects/eudsl-py/src/arith.cpp deleted file mode 100644 index aae213fe..00000000 --- a/projects/eudsl-py/src/arith.cpp +++ /dev/null @@ -1,2788 +0,0 @@ - -#include "ir.h" -namespace nb = nanobind; -using namespace nb::literals; -void populateArithModule(nanobind::module_ & m) { -using namespace mlir; -using namespace mlir::detail; -using namespace mlir::arith; - -auto mlir_arith_ArithDialect = nb::class_(m, "ArithDialect") -.def_static("dialect_namespace", &mlir::arith::ArithDialect::getDialectNamespace) -.def("parse_attribute", &mlir::arith::ArithDialect::parseAttribute, "parser"_a, "type"_a) -.def("print_attribute", &mlir::arith::ArithDialect::printAttribute, "attr"_a, "os"_a) -.def("materialize_constant", &mlir::arith::ArithDialect::materializeConstant, "builder"_a, "value"_a, "type"_a, "loc"_a, nb::rv_policy::reference_internal) -.def_static("insert_into_registry", [](mlir::DialectRegistry ®istry) { registry.insert(); }) -.def_static("load_into_context", [](mlir::MLIRContext &context) { return context.getOrLoadDialect(); }) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ArithDialect__ = nb::class_>(m, "TypeIDResolver[arith::ArithDialect]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ArithDialect>::resolveTypeID) -; - -nb::enum_(m, "CmpFPredicate") -.value("AlwaysFalse", mlir::arith::CmpFPredicate::AlwaysFalse) -.value("OEQ", mlir::arith::CmpFPredicate::OEQ) -.value("OGT", mlir::arith::CmpFPredicate::OGT) -.value("OGE", mlir::arith::CmpFPredicate::OGE) -.value("OLT", mlir::arith::CmpFPredicate::OLT) -.value("OLE", mlir::arith::CmpFPredicate::OLE) -.value("ONE", mlir::arith::CmpFPredicate::ONE) -.value("ORD", mlir::arith::CmpFPredicate::ORD) -.value("UEQ", mlir::arith::CmpFPredicate::UEQ) -.value("UGT", mlir::arith::CmpFPredicate::UGT) -.value("UGE", mlir::arith::CmpFPredicate::UGE) -.value("ULT", mlir::arith::CmpFPredicate::ULT) -.value("ULE", mlir::arith::CmpFPredicate::ULE) -.value("UNE", mlir::arith::CmpFPredicate::UNE) -.value("UNO", mlir::arith::CmpFPredicate::UNO) -.value("AlwaysTrue", mlir::arith::CmpFPredicate::AlwaysTrue) -; - -auto mlir_arith_CmpFPredicateAttr = nb::class_(m, "CmpFPredicateAttr") -.def_static("classof", &mlir::arith::CmpFPredicateAttr::classof, "attr"_a) -.def_static("get", &mlir::arith::CmpFPredicateAttr::get, "context"_a, "val"_a) -.def_prop_ro("value", &mlir::arith::CmpFPredicateAttr::getValue) -; - -auto mlir_FieldParser___mlir_arith_CmpFPredicate_____mlir_arith_CmpFPredicate__ = nb::class_>(m, "FieldParser[arith::CmpFPredicate,arith::CmpFPredicate]") -; - -nb::enum_(m, "CmpIPredicate") -.value("eq", mlir::arith::CmpIPredicate::eq) -.value("ne", mlir::arith::CmpIPredicate::ne) -.value("slt", mlir::arith::CmpIPredicate::slt) -.value("sle", mlir::arith::CmpIPredicate::sle) -.value("sgt", mlir::arith::CmpIPredicate::sgt) -.value("sge", mlir::arith::CmpIPredicate::sge) -.value("ult", mlir::arith::CmpIPredicate::ult) -.value("ule", mlir::arith::CmpIPredicate::ule) -.value("ugt", mlir::arith::CmpIPredicate::ugt) -.value("uge", mlir::arith::CmpIPredicate::uge) -; - -auto mlir_arith_CmpIPredicateAttr = nb::class_(m, "CmpIPredicateAttr") -.def_static("classof", &mlir::arith::CmpIPredicateAttr::classof, "attr"_a) -.def_static("get", &mlir::arith::CmpIPredicateAttr::get, "context"_a, "val"_a) -.def_prop_ro("value", &mlir::arith::CmpIPredicateAttr::getValue) -; - -auto mlir_FieldParser___mlir_arith_CmpIPredicate_____mlir_arith_CmpIPredicate__ = nb::class_>(m, "FieldParser[arith::CmpIPredicate,arith::CmpIPredicate]") -; - -nb::enum_(m, "IntegerOverflowFlags") -.value("none", mlir::arith::IntegerOverflowFlags::none) -.value("nsw", mlir::arith::IntegerOverflowFlags::nsw) -.value("nuw", mlir::arith::IntegerOverflowFlags::nuw) -; - -auto mlir_FieldParser___mlir_arith_IntegerOverflowFlags_____mlir_arith_IntegerOverflowFlags__ = nb::class_>(m, "FieldParser[arith::IntegerOverflowFlags,arith::IntegerOverflowFlags]") -; - -nb::enum_(m, "RoundingMode") -.value("to_nearest_even", mlir::arith::RoundingMode::to_nearest_even) -.value("downward", mlir::arith::RoundingMode::downward) -.value("upward", mlir::arith::RoundingMode::upward) -.value("toward_zero", mlir::arith::RoundingMode::toward_zero) -.value("to_nearest_away", mlir::arith::RoundingMode::to_nearest_away) -; - -auto mlir_arith_RoundingModeAttr = nb::class_(m, "RoundingModeAttr") -.def_static("classof", &mlir::arith::RoundingModeAttr::classof, "attr"_a) -.def_static("get", &mlir::arith::RoundingModeAttr::get, "context"_a, "val"_a) -.def_prop_ro("value", &mlir::arith::RoundingModeAttr::getValue) -; - -auto mlir_FieldParser___mlir_arith_RoundingMode_____mlir_arith_RoundingMode__ = nb::class_>(m, "FieldParser[arith::RoundingMode,arith::RoundingMode]") -; - -nb::enum_(m, "AtomicRMWKind") -.value("addf", mlir::arith::AtomicRMWKind::addf) -.value("addi", mlir::arith::AtomicRMWKind::addi) -.value("assign", mlir::arith::AtomicRMWKind::assign) -.value("maximumf", mlir::arith::AtomicRMWKind::maximumf) -.value("maxs", mlir::arith::AtomicRMWKind::maxs) -.value("maxu", mlir::arith::AtomicRMWKind::maxu) -.value("minimumf", mlir::arith::AtomicRMWKind::minimumf) -.value("mins", mlir::arith::AtomicRMWKind::mins) -.value("minu", mlir::arith::AtomicRMWKind::minu) -.value("mulf", mlir::arith::AtomicRMWKind::mulf) -.value("muli", mlir::arith::AtomicRMWKind::muli) -.value("ori", mlir::arith::AtomicRMWKind::ori) -.value("andi", mlir::arith::AtomicRMWKind::andi) -.value("maxnumf", mlir::arith::AtomicRMWKind::maxnumf) -.value("minnumf", mlir::arith::AtomicRMWKind::minnumf) -; - -auto mlir_arith_AtomicRMWKindAttr = nb::class_(m, "AtomicRMWKindAttr") -.def_static("classof", &mlir::arith::AtomicRMWKindAttr::classof, "attr"_a) -.def_static("get", &mlir::arith::AtomicRMWKindAttr::get, "context"_a, "val"_a) -.def_prop_ro("value", &mlir::arith::AtomicRMWKindAttr::getValue) -; - -auto mlir_FieldParser___mlir_arith_AtomicRMWKind_____mlir_arith_AtomicRMWKind__ = nb::class_>(m, "FieldParser[arith::AtomicRMWKind,arith::AtomicRMWKind]") -; - -nb::enum_(m, "FastMathFlags") -.value("none", mlir::arith::FastMathFlags::none) -.value("reassoc", mlir::arith::FastMathFlags::reassoc) -.value("nnan", mlir::arith::FastMathFlags::nnan) -.value("ninf", mlir::arith::FastMathFlags::ninf) -.value("nsz", mlir::arith::FastMathFlags::nsz) -.value("arcp", mlir::arith::FastMathFlags::arcp) -.value("contract", mlir::arith::FastMathFlags::contract) -.value("afn", mlir::arith::FastMathFlags::afn) -.value("fast", mlir::arith::FastMathFlags::fast) -; - -auto mlir_FieldParser___mlir_arith_FastMathFlags_____mlir_arith_FastMathFlags__ = nb::class_>(m, "FieldParser[arith::FastMathFlags,arith::FastMathFlags]") -; - -auto mlir_arith_FastMathFlagsAttr = nb::class_(m, "FastMathFlagsAttr") -.def_static("get", &mlir::arith::FastMathFlagsAttr::get, "context"_a, "value"_a) -.def_static("mnemonic", &mlir::arith::FastMathFlagsAttr::getMnemonic) -.def_static("parse", &mlir::arith::FastMathFlagsAttr::parse, "ods_parser"_a, "ods_type"_a) -.def("print", &mlir::arith::FastMathFlagsAttr::print, "ods_printer"_a) -.def_prop_ro("value", &mlir::arith::FastMathFlagsAttr::getValue) -; - -auto mlir_arith_IntegerOverflowFlagsAttr = nb::class_(m, "IntegerOverflowFlagsAttr") -.def_static("get", &mlir::arith::IntegerOverflowFlagsAttr::get, "context"_a, "value"_a) -.def_static("mnemonic", &mlir::arith::IntegerOverflowFlagsAttr::getMnemonic) -.def_static("parse", &mlir::arith::IntegerOverflowFlagsAttr::parse, "ods_parser"_a, "ods_type"_a) -.def("print", &mlir::arith::IntegerOverflowFlagsAttr::print, "ods_printer"_a) -.def_prop_ro("value", &mlir::arith::IntegerOverflowFlagsAttr::getValue) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_FastMathFlagsAttr__ = nb::class_>(m, "TypeIDResolver[arith::FastMathFlagsAttr]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::FastMathFlagsAttr>::resolveTypeID) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_IntegerOverflowFlagsAttr__ = nb::class_>(m, "TypeIDResolver[arith::IntegerOverflowFlagsAttr]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::IntegerOverflowFlagsAttr>::resolveTypeID) -; - -auto mlir_arith_detail_ArithFastMathInterfaceInterfaceTraits = nb::class_(m, "ArithFastMathInterfaceInterfaceTraits") -; - -auto mlir_arith_detail_ArithFastMathInterfaceInterfaceTraits_Concept = nb::class_(mlir_arith_detail_ArithFastMathInterfaceInterfaceTraits, "Concept") -; - -auto mlir_arith_ArithFastMathInterface = nb::class_(m, "ArithFastMathInterface") -.def_prop_ro("fast_math_flags_attr", &mlir::arith::ArithFastMathInterface::getFastMathFlagsAttr) -.def_prop_ro("fast_math_attr_name", &mlir::arith::ArithFastMathInterface::getFastMathAttrName) -; - -auto mlir_arith_detail_ArithIntegerOverflowFlagsInterfaceInterfaceTraits = nb::class_(m, "ArithIntegerOverflowFlagsInterfaceInterfaceTraits") -; - -auto mlir_arith_detail_ArithIntegerOverflowFlagsInterfaceInterfaceTraits_Concept = nb::class_(mlir_arith_detail_ArithIntegerOverflowFlagsInterfaceInterfaceTraits, "Concept") -; - -auto mlir_arith_ArithIntegerOverflowFlagsInterface = nb::class_(m, "ArithIntegerOverflowFlagsInterface") -.def_prop_ro("overflow_attr", &mlir::arith::ArithIntegerOverflowFlagsInterface::getOverflowAttr) -.def("has_no_unsigned_wrap", &mlir::arith::ArithIntegerOverflowFlagsInterface::hasNoUnsignedWrap) -.def("has_no_signed_wrap", &mlir::arith::ArithIntegerOverflowFlagsInterface::hasNoSignedWrap) -.def_prop_ro("integer_overflow_attr_name", &mlir::arith::ArithIntegerOverflowFlagsInterface::getIntegerOverflowAttrName) -; - -auto mlir_arith_detail_ArithRoundingModeInterfaceInterfaceTraits = nb::class_(m, "ArithRoundingModeInterfaceInterfaceTraits") -; - -auto mlir_arith_detail_ArithRoundingModeInterfaceInterfaceTraits_Concept = nb::class_(mlir_arith_detail_ArithRoundingModeInterfaceInterfaceTraits, "Concept") -; - -auto mlir_arith_ArithRoundingModeInterface = nb::class_(m, "ArithRoundingModeInterface") -.def_prop_ro("rounding_mode_attr", &mlir::arith::ArithRoundingModeInterface::getRoundingModeAttr) -.def_prop_ro("rounding_mode_attr_name", &mlir::arith::ArithRoundingModeInterface::getRoundingModeAttrName) -; - -auto mlir_arith_detail_AddFOpGenericAdaptorBase = nb::class_(m, "AddFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::AddFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::AddFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::AddFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::AddFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::AddFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_AddFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_AddFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::AddFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::AddFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::AddFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::AddFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_AddFOpAdaptor = nb::class_(m, "AddFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::AddFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_AddFOp = nb::class_(m, "AddFOp") -.def_static("attribute_names", &mlir::arith::AddFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::AddFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::AddFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::AddFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::AddFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::AddFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::AddFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::AddFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::AddFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::AddFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::AddFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::AddFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::AddFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::AddFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::AddFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::AddFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::AddFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::AddFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::AddFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::AddFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::AddFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::AddFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::AddFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::AddFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::AddFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::AddFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::AddFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::AddFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::AddFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::AddFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::AddFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::AddFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AddFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AddFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::AddFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::AddFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::AddFOp::verifyInvariants) -.def("fold", &mlir::arith::AddFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::AddFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::AddFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::AddFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_AddFOp__ = nb::class_>(m, "TypeIDResolver[arith::AddFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::AddFOp>::resolveTypeID) -; - -auto mlir_arith_detail_AddIOpGenericAdaptorBase = nb::class_(m, "AddIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::AddIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::AddIOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::AddIOpGenericAdaptorBase::getAttributes) -.def_prop_ro("overflow_flags_attr", &mlir::arith::detail::AddIOpGenericAdaptorBase::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::detail::AddIOpGenericAdaptorBase::getOverflowFlags) -; - -auto mlir_arith_detail_AddIOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_AddIOpGenericAdaptorBase, "Properties") -.def_prop_ro("overflow_flags", &mlir::arith::detail::AddIOpGenericAdaptorBase::Properties::getOverflowFlags) -.def("set_overflow_flags", &mlir::arith::detail::AddIOpGenericAdaptorBase::Properties::setOverflowFlags, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::AddIOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::AddIOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_AddIOpAdaptor = nb::class_(m, "AddIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::AddIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_AddIOp = nb::class_(m, "AddIOp") -.def_static("attribute_names", &mlir::arith::AddIOp::getAttributeNames) -.def_prop_ro("overflow_flags_attr_name", [](mlir::arith::AddIOp& self){ return self.getOverflowFlagsAttrName(); }) -.def_static("get_overflow_flags_attr_name", [](mlir::OperationName name){ return mlir::arith::AddIOp::getOverflowFlagsAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::AddIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::AddIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::AddIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::AddIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::AddIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::AddIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::AddIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::AddIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::AddIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::AddIOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::AddIOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::AddIOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::AddIOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::AddIOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::AddIOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::AddIOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::AddIOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::AddIOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::AddIOp::writeProperties, "writer"_a) -.def_prop_ro("overflow_flags_attr", &mlir::arith::AddIOp::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::AddIOp::getOverflowFlags) -.def("set_overflow_flags_attr", &mlir::arith::AddIOp::setOverflowFlagsAttr, "attr"_a) -.def("set_overflow_flags", &mlir::arith::AddIOp::setOverflowFlags, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::AddIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::AddIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::AddIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::AddIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::AddIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::AddIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AddIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AddIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::AddIOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::AddIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::AddIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::AddIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::AddIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::AddIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::AddIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::AddIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::AddIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_AddIOp__ = nb::class_>(m, "TypeIDResolver[arith::AddIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::AddIOp>::resolveTypeID) -; - -auto mlir_arith_detail_AddUIExtendedOpGenericAdaptorBase = nb::class_(m, "AddUIExtendedOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::AddUIExtendedOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::AddUIExtendedOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_AddUIExtendedOpAdaptor = nb::class_(m, "AddUIExtendedOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::AddUIExtendedOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_AddUIExtendedOp = nb::class_(m, "AddUIExtendedOp") -.def_static("attribute_names", &mlir::arith::AddUIExtendedOp::getAttributeNames) -.def("get_asm_result_names", &mlir::arith::AddUIExtendedOp::getAsmResultNames, "set_name_fn"_a) -.def_static("operation_name", &mlir::arith::AddUIExtendedOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::AddUIExtendedOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::AddUIExtendedOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::AddUIExtendedOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::AddUIExtendedOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::AddUIExtendedOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::AddUIExtendedOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::AddUIExtendedOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::AddUIExtendedOp::getODSResults, "index"_a) -.def_prop_ro("sum", &mlir::arith::AddUIExtendedOp::getSum) -.def_prop_ro("overflow", &mlir::arith::AddUIExtendedOp::getOverflow) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::AddUIExtendedOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type sum, mlir::Type overflow, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::AddUIExtendedOp::build(odsBuilder, odsState, sum, overflow, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "sum"_a, "overflow"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::AddUIExtendedOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AddUIExtendedOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::AddUIExtendedOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::AddUIExtendedOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::AddUIExtendedOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::AddUIExtendedOp::fold, "adaptor"_a, "results"_a) -.def_static("parse", &mlir::arith::AddUIExtendedOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::AddUIExtendedOp::getEffects, "effects"_a) -.def_prop_ro("shape_for_unroll", &mlir::arith::AddUIExtendedOp::getShapeForUnroll) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_AddUIExtendedOp__ = nb::class_>(m, "TypeIDResolver[arith::AddUIExtendedOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::AddUIExtendedOp>::resolveTypeID) -; - -auto mlir_arith_detail_AndIOpGenericAdaptorBase = nb::class_(m, "AndIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::AndIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::AndIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_AndIOpAdaptor = nb::class_(m, "AndIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::AndIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_AndIOp = nb::class_(m, "AndIOp") -.def_static("attribute_names", &mlir::arith::AndIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::AndIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::AndIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::AndIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::AndIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::AndIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::AndIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::AndIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::AndIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::AndIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::AndIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::AndIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::AndIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::AndIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AndIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::AndIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::AndIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::AndIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::AndIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::AndIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::AndIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::AndIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::AndIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::AndIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_AndIOp__ = nb::class_>(m, "TypeIDResolver[arith::AndIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::AndIOp>::resolveTypeID) -; - -auto mlir_arith_detail_BitcastOpGenericAdaptorBase = nb::class_(m, "BitcastOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::BitcastOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::BitcastOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_BitcastOpAdaptor = nb::class_(m, "BitcastOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::BitcastOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_BitcastOp = nb::class_(m, "BitcastOp") -.def_static("attribute_names", &mlir::arith::BitcastOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::BitcastOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::BitcastOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::BitcastOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::BitcastOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::BitcastOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::BitcastOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::BitcastOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::BitcastOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::BitcastOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::BitcastOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::BitcastOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::BitcastOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::BitcastOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::BitcastOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::BitcastOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::BitcastOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::BitcastOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::BitcastOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_BitcastOp__ = nb::class_>(m, "TypeIDResolver[arith::BitcastOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::BitcastOp>::resolveTypeID) -; - -auto mlir_arith_detail_CeilDivSIOpGenericAdaptorBase = nb::class_(m, "CeilDivSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::CeilDivSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::CeilDivSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_CeilDivSIOpAdaptor = nb::class_(m, "CeilDivSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::CeilDivSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_CeilDivSIOp = nb::class_(m, "CeilDivSIOp") -.def_static("attribute_names", &mlir::arith::CeilDivSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::CeilDivSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::CeilDivSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::CeilDivSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::CeilDivSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::CeilDivSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::CeilDivSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::CeilDivSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::CeilDivSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::CeilDivSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::CeilDivSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CeilDivSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CeilDivSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CeilDivSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CeilDivSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CeilDivSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::CeilDivSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::CeilDivSIOp::verifyInvariants) -.def("fold", &mlir::arith::CeilDivSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::CeilDivSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::CeilDivSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::CeilDivSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::CeilDivSIOp::getEffects, "effects"_a) -.def_prop_ro("speculatability", &mlir::arith::CeilDivSIOp::getSpeculatability) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_CeilDivSIOp__ = nb::class_>(m, "TypeIDResolver[arith::CeilDivSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::CeilDivSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_CeilDivUIOpGenericAdaptorBase = nb::class_(m, "CeilDivUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::CeilDivUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::CeilDivUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_CeilDivUIOpAdaptor = nb::class_(m, "CeilDivUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::CeilDivUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_CeilDivUIOp = nb::class_(m, "CeilDivUIOp") -.def_static("attribute_names", &mlir::arith::CeilDivUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::CeilDivUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::CeilDivUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::CeilDivUIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::CeilDivUIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::CeilDivUIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::CeilDivUIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::CeilDivUIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::CeilDivUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::CeilDivUIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::CeilDivUIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CeilDivUIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CeilDivUIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CeilDivUIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CeilDivUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CeilDivUIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::CeilDivUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::CeilDivUIOp::verifyInvariants) -.def("fold", &mlir::arith::CeilDivUIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::CeilDivUIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::CeilDivUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::CeilDivUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::CeilDivUIOp::getEffects, "effects"_a) -.def_prop_ro("speculatability", &mlir::arith::CeilDivUIOp::getSpeculatability) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_CeilDivUIOp__ = nb::class_>(m, "TypeIDResolver[arith::CeilDivUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::CeilDivUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_CmpFOpGenericAdaptorBase = nb::class_(m, "CmpFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("predicate_attr", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getPredicateAttr) -.def_prop_ro("predicate", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getPredicate) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::CmpFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_CmpFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_CmpFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::CmpFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::CmpFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def_prop_ro("predicate", &mlir::arith::detail::CmpFOpGenericAdaptorBase::Properties::getPredicate) -.def("set_predicate", &mlir::arith::detail::CmpFOpGenericAdaptorBase::Properties::setPredicate, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::CmpFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::CmpFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_CmpFOpAdaptor = nb::class_(m, "CmpFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::CmpFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_CmpFOp = nb::class_(m, "CmpFOp") -.def_static("attribute_names", &mlir::arith::CmpFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::CmpFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::CmpFOp::getFastmathAttrName(name); }, "name"_a) -.def_prop_ro("predicate_attr_name", [](mlir::arith::CmpFOp& self){ return self.getPredicateAttrName(); }) -.def_static("get_predicate_attr_name", [](mlir::OperationName name){ return mlir::arith::CmpFOp::getPredicateAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::CmpFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::CmpFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::CmpFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::CmpFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::CmpFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::CmpFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::CmpFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::CmpFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::CmpFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::CmpFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::CmpFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::CmpFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::CmpFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::CmpFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::CmpFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::CmpFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::CmpFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::CmpFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::CmpFOp::writeProperties, "writer"_a) -.def_prop_ro("predicate_attr", &mlir::arith::CmpFOp::getPredicateAttr) -.def_prop_ro("predicate", &mlir::arith::CmpFOp::getPredicate) -.def_prop_ro("fastmath_attr", &mlir::arith::CmpFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::CmpFOp::getFastmath) -.def("set_predicate_attr", &mlir::arith::CmpFOp::setPredicateAttr, "attr"_a) -.def("set_predicate", &mlir::arith::CmpFOp::setPredicate, "attr_value"_a) -.def("set_fastmath_attr", &mlir::arith::CmpFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::CmpFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::arith::CmpFPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::arith::CmpFPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, result, predicate, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "predicate"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::arith::CmpFPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, predicate, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "predicate"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::arith::CmpFPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, resultTypes, predicate, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "predicate"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::arith::CmpFPredicate predicate, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, result, predicate, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "predicate"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::arith::CmpFPredicate predicate, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, predicate, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "predicate"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::arith::CmpFPredicate predicate, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, resultTypes, predicate, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "predicate"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CmpFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CmpFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::CmpFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::CmpFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::CmpFOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::CmpFOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::CmpFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::CmpFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::CmpFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::CmpFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_CmpFOp__ = nb::class_>(m, "TypeIDResolver[arith::CmpFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::CmpFOp>::resolveTypeID) -; - -auto mlir_arith_detail_CmpIOpGenericAdaptorBase = nb::class_(m, "CmpIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::CmpIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::CmpIOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::CmpIOpGenericAdaptorBase::getAttributes) -.def_prop_ro("predicate_attr", &mlir::arith::detail::CmpIOpGenericAdaptorBase::getPredicateAttr) -.def_prop_ro("predicate", &mlir::arith::detail::CmpIOpGenericAdaptorBase::getPredicate) -; - -auto mlir_arith_detail_CmpIOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_CmpIOpGenericAdaptorBase, "Properties") -.def_prop_ro("predicate", &mlir::arith::detail::CmpIOpGenericAdaptorBase::Properties::getPredicate) -.def("set_predicate", &mlir::arith::detail::CmpIOpGenericAdaptorBase::Properties::setPredicate, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::CmpIOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::CmpIOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_CmpIOpAdaptor = nb::class_(m, "CmpIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::CmpIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_CmpIOp = nb::class_(m, "CmpIOp") -.def_static("attribute_names", &mlir::arith::CmpIOp::getAttributeNames) -.def_prop_ro("predicate_attr_name", [](mlir::arith::CmpIOp& self){ return self.getPredicateAttrName(); }) -.def_static("get_predicate_attr_name", [](mlir::OperationName name){ return mlir::arith::CmpIOp::getPredicateAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::CmpIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::CmpIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::CmpIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::CmpIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::CmpIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::CmpIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::CmpIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::CmpIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::CmpIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::CmpIOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::CmpIOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::CmpIOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::CmpIOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::CmpIOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::CmpIOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::CmpIOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::CmpIOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::CmpIOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::CmpIOp::writeProperties, "writer"_a) -.def_prop_ro("predicate_attr", &mlir::arith::CmpIOp::getPredicateAttr) -.def_prop_ro("predicate", &mlir::arith::CmpIOp::getPredicate) -.def("set_predicate_attr", &mlir::arith::CmpIOp::setPredicateAttr, "attr"_a) -.def("set_predicate", &mlir::arith::CmpIOp::setPredicate, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::arith::CmpIPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, result, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::arith::CmpIPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::arith::CmpIPredicateAttr predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, resultTypes, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::arith::CmpIPredicate predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, result, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::arith::CmpIPredicate predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::arith::CmpIPredicate predicate, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, resultTypes, predicate, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "predicate"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CmpIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::CmpIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::CmpIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::CmpIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::CmpIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::CmpIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::CmpIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::CmpIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::CmpIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::CmpIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_CmpIOp__ = nb::class_>(m, "TypeIDResolver[arith::CmpIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::CmpIOp>::resolveTypeID) -; - -auto mlir_arith_detail_ConstantOpGenericAdaptorBase = nb::class_(m, "ConstantOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ConstantOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::ConstantOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::ConstantOpGenericAdaptorBase::getAttributes) -.def_prop_ro("value_attr", &mlir::arith::detail::ConstantOpGenericAdaptorBase::getValueAttr) -.def_prop_ro("value", &mlir::arith::detail::ConstantOpGenericAdaptorBase::getValue) -; - -auto mlir_arith_detail_ConstantOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_ConstantOpGenericAdaptorBase, "Properties") -.def_prop_ro("value", &mlir::arith::detail::ConstantOpGenericAdaptorBase::Properties::getValue) -.def("set_value", &mlir::arith::detail::ConstantOpGenericAdaptorBase::Properties::setValue, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::ConstantOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::ConstantOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_ConstantOpAdaptor = nb::class_(m, "ConstantOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ConstantOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ConstantOp = nb::class_(m, "ConstantOp") -.def_static("attribute_names", &mlir::arith::ConstantOp::getAttributeNames) -.def_prop_ro("value_attr_name", [](mlir::arith::ConstantOp& self){ return self.getValueAttrName(); }) -.def_static("get_value_attr_name", [](mlir::OperationName name){ return mlir::arith::ConstantOp::getValueAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::ConstantOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ConstantOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ConstantOp::getODSOperands, "index"_a) -.def("get_ods_result_index_and_length", &mlir::arith::ConstantOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ConstantOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::ConstantOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::ConstantOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::ConstantOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::ConstantOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::ConstantOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::ConstantOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::ConstantOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::ConstantOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::ConstantOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::ConstantOp::writeProperties, "writer"_a) -.def_prop_ro("value_attr", &mlir::arith::ConstantOp::getValueAttr) -.def_prop_ro("value", &mlir::arith::ConstantOp::getValue) -.def("set_value_attr", &mlir::arith::ConstantOp::setValueAttr, "attr"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::TypedAttr value){ return mlir::arith::ConstantOp::build(odsBuilder, odsState, result, value); }, "ods_builder"_a, "ods_state"_a, "result"_a, "value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypedAttr value){ return mlir::arith::ConstantOp::build(odsBuilder, odsState, value); }, "ods_builder"_a, "ods_state"_a, "value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::TypedAttr value){ return mlir::arith::ConstantOp::build(odsBuilder, odsState, resultTypes, value); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "value"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ConstantOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ConstantOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::ConstantOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ConstantOp::verifyInvariants) -.def("verify", &mlir::arith::ConstantOp::verify) -.def("fold", &mlir::arith::ConstantOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::ConstantOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("get_asm_result_names", &mlir::arith::ConstantOp::getAsmResultNames, "set_name_fn"_a) -.def("infer_result_ranges", &mlir::arith::ConstantOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::ConstantOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ConstantOp::getEffects, "effects"_a) -.def_static("is_buildable_with", &mlir::arith::ConstantOp::isBuildableWith, "value"_a, "type"_a) -.def_static("materialize", &mlir::arith::ConstantOp::materialize, "builder"_a, "value"_a, "type"_a, "loc"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ConstantOp__ = nb::class_>(m, "TypeIDResolver[arith::ConstantOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ConstantOp>::resolveTypeID) -; - -auto mlir_arith_detail_DivFOpGenericAdaptorBase = nb::class_(m, "DivFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::DivFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::DivFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::DivFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::DivFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::DivFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_DivFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_DivFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::DivFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::DivFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::DivFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::DivFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_DivFOpAdaptor = nb::class_(m, "DivFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::DivFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_DivFOp = nb::class_(m, "DivFOp") -.def_static("attribute_names", &mlir::arith::DivFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::DivFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::DivFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::DivFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::DivFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::DivFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::DivFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::DivFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::DivFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::DivFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::DivFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::DivFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::DivFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::DivFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::DivFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::DivFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::DivFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::DivFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::DivFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::DivFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::DivFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::DivFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::DivFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::DivFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::DivFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::DivFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::DivFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::DivFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::DivFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::DivFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::DivFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::DivFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::DivFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::DivFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::DivFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::DivFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::DivFOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::DivFOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::DivFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::DivFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::DivFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::DivFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_DivFOp__ = nb::class_>(m, "TypeIDResolver[arith::DivFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::DivFOp>::resolveTypeID) -; - -auto mlir_arith_detail_DivSIOpGenericAdaptorBase = nb::class_(m, "DivSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::DivSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::DivSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_DivSIOpAdaptor = nb::class_(m, "DivSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::DivSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_DivSIOp = nb::class_(m, "DivSIOp") -.def_static("attribute_names", &mlir::arith::DivSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::DivSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::DivSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::DivSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::DivSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::DivSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::DivSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::DivSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::DivSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::DivSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::DivSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::DivSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::DivSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::DivSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::DivSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::DivSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::DivSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::DivSIOp::verifyInvariants) -.def("fold", &mlir::arith::DivSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::DivSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::DivSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::DivSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::DivSIOp::getEffects, "effects"_a) -.def_prop_ro("speculatability", &mlir::arith::DivSIOp::getSpeculatability) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_DivSIOp__ = nb::class_>(m, "TypeIDResolver[arith::DivSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::DivSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_DivUIOpGenericAdaptorBase = nb::class_(m, "DivUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::DivUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::DivUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_DivUIOpAdaptor = nb::class_(m, "DivUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::DivUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_DivUIOp = nb::class_(m, "DivUIOp") -.def_static("attribute_names", &mlir::arith::DivUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::DivUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::DivUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::DivUIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::DivUIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::DivUIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::DivUIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::DivUIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::DivUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::DivUIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::DivUIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::DivUIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::DivUIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::DivUIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::DivUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::DivUIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::DivUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::DivUIOp::verifyInvariants) -.def("fold", &mlir::arith::DivUIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::DivUIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::DivUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::DivUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::DivUIOp::getEffects, "effects"_a) -.def_prop_ro("speculatability", &mlir::arith::DivUIOp::getSpeculatability) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_DivUIOp__ = nb::class_>(m, "TypeIDResolver[arith::DivUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::DivUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_ExtFOpGenericAdaptorBase = nb::class_(m, "ExtFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ExtFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::ExtFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::ExtFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::ExtFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::ExtFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_ExtFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_ExtFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::ExtFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::ExtFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::ExtFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::ExtFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_ExtFOpAdaptor = nb::class_(m, "ExtFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ExtFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ExtFOp = nb::class_(m, "ExtFOp") -.def_static("attribute_names", &mlir::arith::ExtFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::ExtFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::ExtFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::ExtFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ExtFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ExtFOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::ExtFOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::ExtFOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::ExtFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ExtFOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::ExtFOp::getOut) -.def_static("set_properties_from_attr", &mlir::arith::ExtFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::ExtFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::ExtFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::ExtFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::ExtFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::ExtFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::ExtFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::ExtFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::ExtFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::ExtFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::ExtFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::ExtFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::ExtFOp::setFastmath, "attr_value"_a) -.def("remove_fastmath_attr", &mlir::arith::ExtFOp::removeFastmathAttr) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::ExtFOp::build(odsBuilder, odsState, out, in, fastmath); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::ExtFOp::build(odsBuilder, odsState, resultTypes, in, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ExtFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::ExtFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ExtFOp::verifyInvariants) -.def("verify", &mlir::arith::ExtFOp::verify) -.def("fold", &mlir::arith::ExtFOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::ExtFOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::ExtFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ExtFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ExtFOp__ = nb::class_>(m, "TypeIDResolver[arith::ExtFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ExtFOp>::resolveTypeID) -; - -auto mlir_arith_detail_ExtSIOpGenericAdaptorBase = nb::class_(m, "ExtSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ExtSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::ExtSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_ExtSIOpAdaptor = nb::class_(m, "ExtSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ExtSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ExtSIOp = nb::class_(m, "ExtSIOp") -.def_static("attribute_names", &mlir::arith::ExtSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::ExtSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ExtSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ExtSIOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::ExtSIOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::ExtSIOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::ExtSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ExtSIOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::ExtSIOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::ExtSIOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::ExtSIOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ExtSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::ExtSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ExtSIOp::verifyInvariants) -.def("verify", &mlir::arith::ExtSIOp::verify) -.def_static("get_canonicalization_patterns", &mlir::arith::ExtSIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::ExtSIOp::fold, "adaptor"_a) -.def("infer_result_ranges", &mlir::arith::ExtSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("are_cast_compatible", &mlir::arith::ExtSIOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::ExtSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ExtSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ExtSIOp__ = nb::class_>(m, "TypeIDResolver[arith::ExtSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ExtSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_ExtUIOpGenericAdaptorBase = nb::class_(m, "ExtUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ExtUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::ExtUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_ExtUIOpAdaptor = nb::class_(m, "ExtUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ExtUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ExtUIOp = nb::class_(m, "ExtUIOp") -.def_static("attribute_names", &mlir::arith::ExtUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::ExtUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ExtUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ExtUIOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::ExtUIOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::ExtUIOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::ExtUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ExtUIOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::ExtUIOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::ExtUIOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::ExtUIOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ExtUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::ExtUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ExtUIOp::verifyInvariants) -.def("verify", &mlir::arith::ExtUIOp::verify) -.def("fold", &mlir::arith::ExtUIOp::fold, "adaptor"_a) -.def("infer_result_ranges", &mlir::arith::ExtUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("are_cast_compatible", &mlir::arith::ExtUIOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::ExtUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ExtUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ExtUIOp__ = nb::class_>(m, "TypeIDResolver[arith::ExtUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ExtUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_FPToSIOpGenericAdaptorBase = nb::class_(m, "FPToSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::FPToSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::FPToSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_FPToSIOpAdaptor = nb::class_(m, "FPToSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::FPToSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_FPToSIOp = nb::class_(m, "FPToSIOp") -.def_static("attribute_names", &mlir::arith::FPToSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::FPToSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::FPToSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::FPToSIOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::FPToSIOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::FPToSIOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::FPToSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::FPToSIOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::FPToSIOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::FPToSIOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::FPToSIOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::FPToSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::FPToSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::FPToSIOp::verifyInvariants) -.def("fold", &mlir::arith::FPToSIOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::FPToSIOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::FPToSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::FPToSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_FPToSIOp__ = nb::class_>(m, "TypeIDResolver[arith::FPToSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::FPToSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_FPToUIOpGenericAdaptorBase = nb::class_(m, "FPToUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::FPToUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::FPToUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_FPToUIOpAdaptor = nb::class_(m, "FPToUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::FPToUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_FPToUIOp = nb::class_(m, "FPToUIOp") -.def_static("attribute_names", &mlir::arith::FPToUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::FPToUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::FPToUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::FPToUIOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::FPToUIOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::FPToUIOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::FPToUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::FPToUIOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::FPToUIOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::FPToUIOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::FPToUIOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::FPToUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::FPToUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::FPToUIOp::verifyInvariants) -.def("fold", &mlir::arith::FPToUIOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::FPToUIOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::FPToUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::FPToUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_FPToUIOp__ = nb::class_>(m, "TypeIDResolver[arith::FPToUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::FPToUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_FloorDivSIOpGenericAdaptorBase = nb::class_(m, "FloorDivSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::FloorDivSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::FloorDivSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_FloorDivSIOpAdaptor = nb::class_(m, "FloorDivSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::FloorDivSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_FloorDivSIOp = nb::class_(m, "FloorDivSIOp") -.def_static("attribute_names", &mlir::arith::FloorDivSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::FloorDivSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::FloorDivSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::FloorDivSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::FloorDivSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::FloorDivSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::FloorDivSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::FloorDivSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::FloorDivSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::FloorDivSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::FloorDivSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::FloorDivSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::FloorDivSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::FloorDivSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::FloorDivSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::FloorDivSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::FloorDivSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::FloorDivSIOp::verifyInvariants) -.def("fold", &mlir::arith::FloorDivSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::FloorDivSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::FloorDivSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::FloorDivSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::FloorDivSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_FloorDivSIOp__ = nb::class_>(m, "TypeIDResolver[arith::FloorDivSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::FloorDivSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_IndexCastOpGenericAdaptorBase = nb::class_(m, "IndexCastOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::IndexCastOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::IndexCastOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_IndexCastOpAdaptor = nb::class_(m, "IndexCastOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::IndexCastOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_IndexCastOp = nb::class_(m, "IndexCastOp") -.def_static("attribute_names", &mlir::arith::IndexCastOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::IndexCastOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::IndexCastOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::IndexCastOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::IndexCastOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::IndexCastOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::IndexCastOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::IndexCastOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::IndexCastOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::IndexCastOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::IndexCastOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::IndexCastOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::IndexCastOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::IndexCastOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::IndexCastOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::IndexCastOp::fold, "adaptor"_a) -.def("infer_result_ranges", &mlir::arith::IndexCastOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("are_cast_compatible", &mlir::arith::IndexCastOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::IndexCastOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::IndexCastOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_IndexCastOp__ = nb::class_>(m, "TypeIDResolver[arith::IndexCastOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::IndexCastOp>::resolveTypeID) -; - -auto mlir_arith_detail_IndexCastUIOpGenericAdaptorBase = nb::class_(m, "IndexCastUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::IndexCastUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::IndexCastUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_IndexCastUIOpAdaptor = nb::class_(m, "IndexCastUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::IndexCastUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_IndexCastUIOp = nb::class_(m, "IndexCastUIOp") -.def_static("attribute_names", &mlir::arith::IndexCastUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::IndexCastUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::IndexCastUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::IndexCastUIOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::IndexCastUIOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::IndexCastUIOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::IndexCastUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::IndexCastUIOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::IndexCastUIOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::IndexCastUIOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::IndexCastUIOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::IndexCastUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::IndexCastUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::IndexCastUIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::IndexCastUIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::IndexCastUIOp::fold, "adaptor"_a) -.def("infer_result_ranges", &mlir::arith::IndexCastUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("are_cast_compatible", &mlir::arith::IndexCastUIOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::IndexCastUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::IndexCastUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_IndexCastUIOp__ = nb::class_>(m, "TypeIDResolver[arith::IndexCastUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::IndexCastUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_MaxNumFOpGenericAdaptorBase = nb::class_(m, "MaxNumFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_MaxNumFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_MaxNumFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::MaxNumFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_MaxNumFOpAdaptor = nb::class_(m, "MaxNumFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MaxNumFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MaxNumFOp = nb::class_(m, "MaxNumFOp") -.def_static("attribute_names", &mlir::arith::MaxNumFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::MaxNumFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::MaxNumFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::MaxNumFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MaxNumFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MaxNumFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MaxNumFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MaxNumFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MaxNumFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MaxNumFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MaxNumFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MaxNumFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MaxNumFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::MaxNumFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::MaxNumFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::MaxNumFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::MaxNumFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::MaxNumFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::MaxNumFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::MaxNumFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::MaxNumFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::MaxNumFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::MaxNumFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::MaxNumFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::MaxNumFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::MaxNumFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaxNumFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaxNumFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::MaxNumFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::MaxNumFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MaxNumFOp::verifyInvariants) -.def("fold", &mlir::arith::MaxNumFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MaxNumFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MaxNumFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MaxNumFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MaxNumFOp__ = nb::class_>(m, "TypeIDResolver[arith::MaxNumFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MaxNumFOp>::resolveTypeID) -; - -auto mlir_arith_detail_MaxSIOpGenericAdaptorBase = nb::class_(m, "MaxSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MaxSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::MaxSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_MaxSIOpAdaptor = nb::class_(m, "MaxSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MaxSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MaxSIOp = nb::class_(m, "MaxSIOp") -.def_static("attribute_names", &mlir::arith::MaxSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::MaxSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MaxSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MaxSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MaxSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MaxSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MaxSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MaxSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MaxSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MaxSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MaxSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MaxSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MaxSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MaxSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaxSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaxSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::MaxSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MaxSIOp::verifyInvariants) -.def("fold", &mlir::arith::MaxSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MaxSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::MaxSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::MaxSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MaxSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MaxSIOp__ = nb::class_>(m, "TypeIDResolver[arith::MaxSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MaxSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_MaxUIOpGenericAdaptorBase = nb::class_(m, "MaxUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MaxUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::MaxUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_MaxUIOpAdaptor = nb::class_(m, "MaxUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MaxUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MaxUIOp = nb::class_(m, "MaxUIOp") -.def_static("attribute_names", &mlir::arith::MaxUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::MaxUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MaxUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MaxUIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MaxUIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MaxUIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MaxUIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MaxUIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MaxUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MaxUIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MaxUIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MaxUIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MaxUIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MaxUIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaxUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaxUIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::MaxUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MaxUIOp::verifyInvariants) -.def("fold", &mlir::arith::MaxUIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MaxUIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::MaxUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::MaxUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MaxUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MaxUIOp__ = nb::class_>(m, "TypeIDResolver[arith::MaxUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MaxUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_MaximumFOpGenericAdaptorBase = nb::class_(m, "MaximumFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_MaximumFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_MaximumFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::MaximumFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_MaximumFOpAdaptor = nb::class_(m, "MaximumFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MaximumFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MaximumFOp = nb::class_(m, "MaximumFOp") -.def_static("attribute_names", &mlir::arith::MaximumFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::MaximumFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::MaximumFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::MaximumFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MaximumFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MaximumFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MaximumFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MaximumFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MaximumFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MaximumFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MaximumFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MaximumFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MaximumFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::MaximumFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::MaximumFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::MaximumFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::MaximumFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::MaximumFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::MaximumFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::MaximumFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::MaximumFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::MaximumFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::MaximumFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::MaximumFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::MaximumFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::MaximumFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaximumFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MaximumFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::MaximumFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::MaximumFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MaximumFOp::verifyInvariants) -.def("fold", &mlir::arith::MaximumFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MaximumFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MaximumFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MaximumFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MaximumFOp__ = nb::class_>(m, "TypeIDResolver[arith::MaximumFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MaximumFOp>::resolveTypeID) -; - -auto mlir_arith_detail_MinNumFOpGenericAdaptorBase = nb::class_(m, "MinNumFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_MinNumFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_MinNumFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::MinNumFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_MinNumFOpAdaptor = nb::class_(m, "MinNumFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MinNumFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MinNumFOp = nb::class_(m, "MinNumFOp") -.def_static("attribute_names", &mlir::arith::MinNumFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::MinNumFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::MinNumFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::MinNumFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MinNumFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MinNumFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MinNumFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MinNumFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MinNumFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MinNumFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MinNumFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MinNumFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MinNumFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::MinNumFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::MinNumFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::MinNumFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::MinNumFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::MinNumFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::MinNumFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::MinNumFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::MinNumFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::MinNumFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::MinNumFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::MinNumFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::MinNumFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::MinNumFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinNumFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinNumFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::MinNumFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::MinNumFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MinNumFOp::verifyInvariants) -.def("fold", &mlir::arith::MinNumFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MinNumFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MinNumFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MinNumFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MinNumFOp__ = nb::class_>(m, "TypeIDResolver[arith::MinNumFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MinNumFOp>::resolveTypeID) -; - -auto mlir_arith_detail_MinSIOpGenericAdaptorBase = nb::class_(m, "MinSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MinSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::MinSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_MinSIOpAdaptor = nb::class_(m, "MinSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MinSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MinSIOp = nb::class_(m, "MinSIOp") -.def_static("attribute_names", &mlir::arith::MinSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::MinSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MinSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MinSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MinSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MinSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MinSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MinSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MinSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MinSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MinSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MinSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MinSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MinSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::MinSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MinSIOp::verifyInvariants) -.def("fold", &mlir::arith::MinSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MinSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::MinSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::MinSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MinSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MinSIOp__ = nb::class_>(m, "TypeIDResolver[arith::MinSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MinSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_MinUIOpGenericAdaptorBase = nb::class_(m, "MinUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MinUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::MinUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_MinUIOpAdaptor = nb::class_(m, "MinUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MinUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MinUIOp = nb::class_(m, "MinUIOp") -.def_static("attribute_names", &mlir::arith::MinUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::MinUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MinUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MinUIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MinUIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MinUIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MinUIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MinUIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MinUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MinUIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MinUIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MinUIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MinUIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MinUIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinUIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::MinUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MinUIOp::verifyInvariants) -.def("fold", &mlir::arith::MinUIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MinUIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::MinUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::MinUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MinUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MinUIOp__ = nb::class_>(m, "TypeIDResolver[arith::MinUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MinUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_MinimumFOpGenericAdaptorBase = nb::class_(m, "MinimumFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_MinimumFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_MinimumFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::MinimumFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_MinimumFOpAdaptor = nb::class_(m, "MinimumFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MinimumFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MinimumFOp = nb::class_(m, "MinimumFOp") -.def_static("attribute_names", &mlir::arith::MinimumFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::MinimumFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::MinimumFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::MinimumFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MinimumFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MinimumFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MinimumFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MinimumFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MinimumFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MinimumFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MinimumFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MinimumFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MinimumFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::MinimumFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::MinimumFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::MinimumFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::MinimumFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::MinimumFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::MinimumFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::MinimumFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::MinimumFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::MinimumFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::MinimumFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::MinimumFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::MinimumFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::MinimumFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinimumFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MinimumFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::MinimumFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::MinimumFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MinimumFOp::verifyInvariants) -.def("fold", &mlir::arith::MinimumFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MinimumFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MinimumFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MinimumFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MinimumFOp__ = nb::class_>(m, "TypeIDResolver[arith::MinimumFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MinimumFOp>::resolveTypeID) -; - -auto mlir_arith_detail_MulFOpGenericAdaptorBase = nb::class_(m, "MulFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MulFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::MulFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::MulFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::MulFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::MulFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_MulFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_MulFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::MulFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::MulFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::MulFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::MulFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_MulFOpAdaptor = nb::class_(m, "MulFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MulFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MulFOp = nb::class_(m, "MulFOp") -.def_static("attribute_names", &mlir::arith::MulFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::MulFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::MulFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::MulFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MulFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MulFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MulFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MulFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MulFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MulFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MulFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MulFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MulFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::MulFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::MulFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::MulFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::MulFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::MulFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::MulFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::MulFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::MulFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::MulFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::MulFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::MulFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::MulFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::MulFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MulFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MulFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::MulFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MulFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MulFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::MulFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::MulFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::MulFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MulFOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::MulFOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::MulFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MulFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MulFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MulFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MulFOp__ = nb::class_>(m, "TypeIDResolver[arith::MulFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MulFOp>::resolveTypeID) -; - -auto mlir_arith_detail_MulIOpGenericAdaptorBase = nb::class_(m, "MulIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MulIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::MulIOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::MulIOpGenericAdaptorBase::getAttributes) -.def_prop_ro("overflow_flags_attr", &mlir::arith::detail::MulIOpGenericAdaptorBase::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::detail::MulIOpGenericAdaptorBase::getOverflowFlags) -; - -auto mlir_arith_detail_MulIOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_MulIOpGenericAdaptorBase, "Properties") -.def_prop_ro("overflow_flags", &mlir::arith::detail::MulIOpGenericAdaptorBase::Properties::getOverflowFlags) -.def("set_overflow_flags", &mlir::arith::detail::MulIOpGenericAdaptorBase::Properties::setOverflowFlags, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::MulIOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::MulIOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_MulIOpAdaptor = nb::class_(m, "MulIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MulIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MulIOp = nb::class_(m, "MulIOp") -.def_static("attribute_names", &mlir::arith::MulIOp::getAttributeNames) -.def_prop_ro("overflow_flags_attr_name", [](mlir::arith::MulIOp& self){ return self.getOverflowFlagsAttrName(); }) -.def_static("get_overflow_flags_attr_name", [](mlir::OperationName name){ return mlir::arith::MulIOp::getOverflowFlagsAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::MulIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MulIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MulIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MulIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MulIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MulIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MulIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MulIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MulIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::MulIOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::MulIOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::MulIOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::MulIOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::MulIOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::MulIOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::MulIOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::MulIOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::MulIOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::MulIOp::writeProperties, "writer"_a) -.def_prop_ro("overflow_flags_attr", &mlir::arith::MulIOp::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::MulIOp::getOverflowFlags) -.def("set_overflow_flags_attr", &mlir::arith::MulIOp::setOverflowFlagsAttr, "attr"_a) -.def("set_overflow_flags", &mlir::arith::MulIOp::setOverflowFlags, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::MulIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::MulIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::MulIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::MulIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::MulIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::MulIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::MulIOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::MulIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MulIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::MulIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::MulIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::MulIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("get_asm_result_names", &mlir::arith::MulIOp::getAsmResultNames, "set_name_fn"_a) -.def("infer_result_ranges", &mlir::arith::MulIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::MulIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MulIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MulIOp__ = nb::class_>(m, "TypeIDResolver[arith::MulIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MulIOp>::resolveTypeID) -; - -auto mlir_arith_detail_MulSIExtendedOpGenericAdaptorBase = nb::class_(m, "MulSIExtendedOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MulSIExtendedOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::MulSIExtendedOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_MulSIExtendedOpAdaptor = nb::class_(m, "MulSIExtendedOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MulSIExtendedOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MulSIExtendedOp = nb::class_(m, "MulSIExtendedOp") -.def_static("attribute_names", &mlir::arith::MulSIExtendedOp::getAttributeNames) -.def("get_asm_result_names", &mlir::arith::MulSIExtendedOp::getAsmResultNames, "set_name_fn"_a) -.def_static("operation_name", &mlir::arith::MulSIExtendedOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MulSIExtendedOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MulSIExtendedOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MulSIExtendedOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MulSIExtendedOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MulSIExtendedOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MulSIExtendedOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MulSIExtendedOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MulSIExtendedOp::getODSResults, "index"_a) -.def_prop_ro("low", &mlir::arith::MulSIExtendedOp::getLow) -.def_prop_ro("high", &mlir::arith::MulSIExtendedOp::getHigh) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type low, mlir::Type high, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MulSIExtendedOp::build(odsBuilder, odsState, low, high, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "low"_a, "high"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MulSIExtendedOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MulSIExtendedOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulSIExtendedOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulSIExtendedOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::MulSIExtendedOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MulSIExtendedOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::MulSIExtendedOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::MulSIExtendedOp::fold, "adaptor"_a, "results"_a) -.def_static("infer_return_types", &mlir::arith::MulSIExtendedOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MulSIExtendedOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MulSIExtendedOp::getEffects, "effects"_a) -.def_prop_ro("shape_for_unroll", &mlir::arith::MulSIExtendedOp::getShapeForUnroll) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MulSIExtendedOp__ = nb::class_>(m, "TypeIDResolver[arith::MulSIExtendedOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MulSIExtendedOp>::resolveTypeID) -; - -auto mlir_arith_detail_MulUIExtendedOpGenericAdaptorBase = nb::class_(m, "MulUIExtendedOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::MulUIExtendedOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::MulUIExtendedOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_MulUIExtendedOpAdaptor = nb::class_(m, "MulUIExtendedOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::MulUIExtendedOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_MulUIExtendedOp = nb::class_(m, "MulUIExtendedOp") -.def_static("attribute_names", &mlir::arith::MulUIExtendedOp::getAttributeNames) -.def("get_asm_result_names", &mlir::arith::MulUIExtendedOp::getAsmResultNames, "set_name_fn"_a) -.def_static("operation_name", &mlir::arith::MulUIExtendedOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::MulUIExtendedOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::MulUIExtendedOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::MulUIExtendedOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::MulUIExtendedOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::MulUIExtendedOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::MulUIExtendedOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::MulUIExtendedOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::MulUIExtendedOp::getODSResults, "index"_a) -.def_prop_ro("low", &mlir::arith::MulUIExtendedOp::getLow) -.def_prop_ro("high", &mlir::arith::MulUIExtendedOp::getHigh) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type low, mlir::Type high, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MulUIExtendedOp::build(odsBuilder, odsState, low, high, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "low"_a, "high"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MulUIExtendedOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::MulUIExtendedOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulUIExtendedOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::MulUIExtendedOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::MulUIExtendedOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::MulUIExtendedOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::MulUIExtendedOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::MulUIExtendedOp::fold, "adaptor"_a, "results"_a) -.def_static("infer_return_types", &mlir::arith::MulUIExtendedOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::MulUIExtendedOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::MulUIExtendedOp::getEffects, "effects"_a) -.def_prop_ro("shape_for_unroll", &mlir::arith::MulUIExtendedOp::getShapeForUnroll) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_MulUIExtendedOp__ = nb::class_>(m, "TypeIDResolver[arith::MulUIExtendedOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::MulUIExtendedOp>::resolveTypeID) -; - -auto mlir_arith_detail_NegFOpGenericAdaptorBase = nb::class_(m, "NegFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::NegFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::NegFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::NegFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::NegFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::NegFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_NegFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_NegFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::NegFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::NegFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::NegFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::NegFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_NegFOpAdaptor = nb::class_(m, "NegFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::NegFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_NegFOp = nb::class_(m, "NegFOp") -.def_static("attribute_names", &mlir::arith::NegFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::NegFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::NegFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::NegFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::NegFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::NegFOp::getODSOperands, "index"_a) -.def_prop_ro("operand", &mlir::arith::NegFOp::getOperand) -.def_prop_ro("operand_mutable", &mlir::arith::NegFOp::getOperandMutable) -.def("get_ods_result_index_and_length", &mlir::arith::NegFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::NegFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::NegFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::NegFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::NegFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::NegFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::NegFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::NegFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::NegFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::NegFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::NegFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::NegFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::NegFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::NegFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::NegFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::NegFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value operand, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::NegFOp::build(odsBuilder, odsState, result, operand, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "operand"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value operand, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::NegFOp::build(odsBuilder, odsState, operand, fastmath); }, "ods_builder"_a, "ods_state"_a, "operand"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value operand, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::NegFOp::build(odsBuilder, odsState, resultTypes, operand, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "operand"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value operand, mlir::arith::FastMathFlags fastmath){ return mlir::arith::NegFOp::build(odsBuilder, odsState, result, operand, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "operand"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value operand, mlir::arith::FastMathFlags fastmath){ return mlir::arith::NegFOp::build(odsBuilder, odsState, operand, fastmath); }, "ods_builder"_a, "ods_state"_a, "operand"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value operand, mlir::arith::FastMathFlags fastmath){ return mlir::arith::NegFOp::build(odsBuilder, odsState, resultTypes, operand, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "operand"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::NegFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::NegFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::NegFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::NegFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::NegFOp::verifyInvariants) -.def("fold", &mlir::arith::NegFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::NegFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::NegFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::NegFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_NegFOp__ = nb::class_>(m, "TypeIDResolver[arith::NegFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::NegFOp>::resolveTypeID) -; - -auto mlir_arith_detail_OrIOpGenericAdaptorBase = nb::class_(m, "OrIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::OrIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::OrIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_OrIOpAdaptor = nb::class_(m, "OrIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::OrIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_OrIOp = nb::class_(m, "OrIOp") -.def_static("attribute_names", &mlir::arith::OrIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::OrIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::OrIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::OrIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::OrIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::OrIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::OrIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::OrIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::OrIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::OrIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::OrIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::OrIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::OrIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::OrIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::OrIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::OrIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::OrIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::OrIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::OrIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::OrIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::OrIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::OrIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::OrIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::OrIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_OrIOp__ = nb::class_>(m, "TypeIDResolver[arith::OrIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::OrIOp>::resolveTypeID) -; - -auto mlir_arith_detail_RemFOpGenericAdaptorBase = nb::class_(m, "RemFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::RemFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::RemFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::RemFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::RemFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::RemFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_RemFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_RemFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::RemFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::RemFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::RemFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::RemFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_RemFOpAdaptor = nb::class_(m, "RemFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::RemFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_RemFOp = nb::class_(m, "RemFOp") -.def_static("attribute_names", &mlir::arith::RemFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::RemFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::RemFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::RemFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::RemFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::RemFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::RemFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::RemFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::RemFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::RemFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::RemFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::RemFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::RemFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::RemFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::RemFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::RemFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::RemFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::RemFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::RemFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::RemFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::RemFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::RemFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::RemFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::RemFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::RemFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::RemFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::RemFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::RemFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::RemFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::RemFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::RemFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::RemFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::RemFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::RemFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::RemFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::RemFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::RemFOp::verifyInvariants) -.def("fold", &mlir::arith::RemFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::RemFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::RemFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::RemFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_RemFOp__ = nb::class_>(m, "TypeIDResolver[arith::RemFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::RemFOp>::resolveTypeID) -; - -auto mlir_arith_detail_RemSIOpGenericAdaptorBase = nb::class_(m, "RemSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::RemSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::RemSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_RemSIOpAdaptor = nb::class_(m, "RemSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::RemSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_RemSIOp = nb::class_(m, "RemSIOp") -.def_static("attribute_names", &mlir::arith::RemSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::RemSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::RemSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::RemSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::RemSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::RemSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::RemSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::RemSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::RemSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::RemSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::RemSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::RemSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::RemSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::RemSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::RemSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::RemSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::RemSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::RemSIOp::verifyInvariants) -.def("fold", &mlir::arith::RemSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::RemSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::RemSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::RemSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::RemSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_RemSIOp__ = nb::class_>(m, "TypeIDResolver[arith::RemSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::RemSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_RemUIOpGenericAdaptorBase = nb::class_(m, "RemUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::RemUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::RemUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_RemUIOpAdaptor = nb::class_(m, "RemUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::RemUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_RemUIOp = nb::class_(m, "RemUIOp") -.def_static("attribute_names", &mlir::arith::RemUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::RemUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::RemUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::RemUIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::RemUIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::RemUIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::RemUIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::RemUIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::RemUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::RemUIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::RemUIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::RemUIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::RemUIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::RemUIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::RemUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::RemUIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::RemUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::RemUIOp::verifyInvariants) -.def("fold", &mlir::arith::RemUIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::RemUIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::RemUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::RemUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::RemUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_RemUIOp__ = nb::class_>(m, "TypeIDResolver[arith::RemUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::RemUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_SIToFPOpGenericAdaptorBase = nb::class_(m, "SIToFPOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::SIToFPOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::SIToFPOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_SIToFPOpAdaptor = nb::class_(m, "SIToFPOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::SIToFPOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_SIToFPOp = nb::class_(m, "SIToFPOp") -.def_static("attribute_names", &mlir::arith::SIToFPOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::SIToFPOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::SIToFPOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::SIToFPOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::SIToFPOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::SIToFPOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::SIToFPOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::SIToFPOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::SIToFPOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::SIToFPOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::SIToFPOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SIToFPOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::SIToFPOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::SIToFPOp::verifyInvariants) -.def("fold", &mlir::arith::SIToFPOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::SIToFPOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::SIToFPOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::SIToFPOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_SIToFPOp__ = nb::class_>(m, "TypeIDResolver[arith::SIToFPOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::SIToFPOp>::resolveTypeID) -; - -auto mlir_arith_detail_ShLIOpGenericAdaptorBase = nb::class_(m, "ShLIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ShLIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::ShLIOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::ShLIOpGenericAdaptorBase::getAttributes) -.def_prop_ro("overflow_flags_attr", &mlir::arith::detail::ShLIOpGenericAdaptorBase::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::detail::ShLIOpGenericAdaptorBase::getOverflowFlags) -; - -auto mlir_arith_detail_ShLIOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_ShLIOpGenericAdaptorBase, "Properties") -.def_prop_ro("overflow_flags", &mlir::arith::detail::ShLIOpGenericAdaptorBase::Properties::getOverflowFlags) -.def("set_overflow_flags", &mlir::arith::detail::ShLIOpGenericAdaptorBase::Properties::setOverflowFlags, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::ShLIOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::ShLIOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_ShLIOpAdaptor = nb::class_(m, "ShLIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ShLIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ShLIOp = nb::class_(m, "ShLIOp") -.def_static("attribute_names", &mlir::arith::ShLIOp::getAttributeNames) -.def_prop_ro("overflow_flags_attr_name", [](mlir::arith::ShLIOp& self){ return self.getOverflowFlagsAttrName(); }) -.def_static("get_overflow_flags_attr_name", [](mlir::OperationName name){ return mlir::arith::ShLIOp::getOverflowFlagsAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::ShLIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ShLIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ShLIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::ShLIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::ShLIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::ShLIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::ShLIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::ShLIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ShLIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::ShLIOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::ShLIOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::ShLIOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::ShLIOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::ShLIOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::ShLIOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::ShLIOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::ShLIOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::ShLIOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::ShLIOp::writeProperties, "writer"_a) -.def_prop_ro("overflow_flags_attr", &mlir::arith::ShLIOp::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::ShLIOp::getOverflowFlags) -.def("set_overflow_flags_attr", &mlir::arith::ShLIOp::setOverflowFlagsAttr, "attr"_a) -.def("set_overflow_flags", &mlir::arith::ShLIOp::setOverflowFlags, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ShLIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ShLIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::ShLIOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::ShLIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ShLIOp::verifyInvariants) -.def("fold", &mlir::arith::ShLIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::ShLIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::ShLIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::ShLIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ShLIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ShLIOp__ = nb::class_>(m, "TypeIDResolver[arith::ShLIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ShLIOp>::resolveTypeID) -; - -auto mlir_arith_detail_ShRSIOpGenericAdaptorBase = nb::class_(m, "ShRSIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ShRSIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::ShRSIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_ShRSIOpAdaptor = nb::class_(m, "ShRSIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ShRSIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ShRSIOp = nb::class_(m, "ShRSIOp") -.def_static("attribute_names", &mlir::arith::ShRSIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::ShRSIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ShRSIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ShRSIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::ShRSIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::ShRSIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::ShRSIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::ShRSIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::ShRSIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ShRSIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::ShRSIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::ShRSIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::ShRSIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::ShRSIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ShRSIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ShRSIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::ShRSIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ShRSIOp::verifyInvariants) -.def("fold", &mlir::arith::ShRSIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::ShRSIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::ShRSIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::ShRSIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ShRSIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ShRSIOp__ = nb::class_>(m, "TypeIDResolver[arith::ShRSIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ShRSIOp>::resolveTypeID) -; - -auto mlir_arith_detail_ShRUIOpGenericAdaptorBase = nb::class_(m, "ShRUIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::ShRUIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::ShRUIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_ShRUIOpAdaptor = nb::class_(m, "ShRUIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::ShRUIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_ShRUIOp = nb::class_(m, "ShRUIOp") -.def_static("attribute_names", &mlir::arith::ShRUIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::ShRUIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::ShRUIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::ShRUIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::ShRUIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::ShRUIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::ShRUIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::ShRUIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::ShRUIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::ShRUIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::ShRUIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::ShRUIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::ShRUIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::ShRUIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ShRUIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::ShRUIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::ShRUIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::ShRUIOp::verifyInvariants) -.def("fold", &mlir::arith::ShRUIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::ShRUIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::ShRUIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::ShRUIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::ShRUIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_ShRUIOp__ = nb::class_>(m, "TypeIDResolver[arith::ShRUIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::ShRUIOp>::resolveTypeID) -; - -auto mlir_arith_detail_SubFOpGenericAdaptorBase = nb::class_(m, "SubFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::SubFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::SubFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::SubFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::SubFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::SubFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_SubFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_SubFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::SubFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::SubFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::SubFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::SubFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_SubFOpAdaptor = nb::class_(m, "SubFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::SubFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_SubFOp = nb::class_(m, "SubFOp") -.def_static("attribute_names", &mlir::arith::SubFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::SubFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::SubFOp::getFastmathAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::SubFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::SubFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::SubFOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::SubFOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::SubFOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::SubFOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::SubFOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::SubFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::SubFOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::SubFOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::SubFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::SubFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::SubFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::SubFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::SubFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::SubFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::SubFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::SubFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::SubFOp::writeProperties, "writer"_a) -.def_prop_ro("fastmath_attr", &mlir::arith::SubFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::SubFOp::getFastmath) -.def("set_fastmath_attr", &mlir::arith::SubFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::SubFOp::setFastmath, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::SubFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::SubFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::SubFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::SubFOp::build(odsBuilder, odsState, result, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::SubFOp::build(odsBuilder, odsState, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::FastMathFlags fastmath){ return mlir::arith::SubFOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SubFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SubFOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::SubFOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::SubFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::SubFOp::verifyInvariants) -.def("fold", &mlir::arith::SubFOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::SubFOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("parse", &mlir::arith::SubFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::SubFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_SubFOp__ = nb::class_>(m, "TypeIDResolver[arith::SubFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::SubFOp>::resolveTypeID) -; - -auto mlir_arith_detail_SubIOpGenericAdaptorBase = nb::class_(m, "SubIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::SubIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::SubIOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::SubIOpGenericAdaptorBase::getAttributes) -.def_prop_ro("overflow_flags_attr", &mlir::arith::detail::SubIOpGenericAdaptorBase::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::detail::SubIOpGenericAdaptorBase::getOverflowFlags) -; - -auto mlir_arith_detail_SubIOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_SubIOpGenericAdaptorBase, "Properties") -.def_prop_ro("overflow_flags", &mlir::arith::detail::SubIOpGenericAdaptorBase::Properties::getOverflowFlags) -.def("set_overflow_flags", &mlir::arith::detail::SubIOpGenericAdaptorBase::Properties::setOverflowFlags, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::SubIOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::SubIOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_SubIOpAdaptor = nb::class_(m, "SubIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::SubIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_SubIOp = nb::class_(m, "SubIOp") -.def_static("attribute_names", &mlir::arith::SubIOp::getAttributeNames) -.def_prop_ro("overflow_flags_attr_name", [](mlir::arith::SubIOp& self){ return self.getOverflowFlagsAttrName(); }) -.def_static("get_overflow_flags_attr_name", [](mlir::OperationName name){ return mlir::arith::SubIOp::getOverflowFlagsAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::SubIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::SubIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::SubIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::SubIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::SubIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::SubIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::SubIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::SubIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::SubIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::SubIOp::getResult) -.def_static("set_properties_from_attr", &mlir::arith::SubIOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::SubIOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::SubIOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::SubIOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::SubIOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::SubIOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::SubIOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::SubIOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::SubIOp::writeProperties, "writer"_a) -.def_prop_ro("overflow_flags_attr", &mlir::arith::SubIOp::getOverflowFlagsAttr) -.def_prop_ro("overflow_flags", &mlir::arith::SubIOp::getOverflowFlags) -.def("set_overflow_flags_attr", &mlir::arith::SubIOp::setOverflowFlagsAttr, "attr"_a) -.def("set_overflow_flags", &mlir::arith::SubIOp::setOverflowFlags, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::SubIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::SubIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlagsAttr overflowFlags){ return mlir::arith::SubIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::SubIOp::build(odsBuilder, odsState, result, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::SubIOp::build(odsBuilder, odsState, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs, mlir::arith::IntegerOverflowFlags overflowFlags){ return mlir::arith::SubIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs, overflowFlags); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a, "overflow_flags"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SubIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SubIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("populate_default_properties", &mlir::arith::SubIOp::populateDefaultProperties, "op_name"_a, "properties"_a) -.def("verify_invariants_impl", &mlir::arith::SubIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::SubIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::SubIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::SubIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::SubIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::SubIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::SubIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::SubIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_SubIOp__ = nb::class_>(m, "TypeIDResolver[arith::SubIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::SubIOp>::resolveTypeID) -; - -auto mlir_arith_detail_TruncFOpGenericAdaptorBase = nb::class_(m, "TruncFOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getAttributes) -.def_prop_ro("roundingmode_attr", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getRoundingmodeAttr) -.def_prop_ro("roundingmode", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getRoundingmode) -.def_prop_ro("fastmath_attr", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::detail::TruncFOpGenericAdaptorBase::getFastmath) -; - -auto mlir_arith_detail_TruncFOpGenericAdaptorBase_Properties = nb::class_(mlir_arith_detail_TruncFOpGenericAdaptorBase, "Properties") -.def_prop_ro("fastmath", &mlir::arith::detail::TruncFOpGenericAdaptorBase::Properties::getFastmath) -.def("set_fastmath", &mlir::arith::detail::TruncFOpGenericAdaptorBase::Properties::setFastmath, "prop_value"_a) -.def_prop_ro("roundingmode", &mlir::arith::detail::TruncFOpGenericAdaptorBase::Properties::getRoundingmode) -.def("set_roundingmode", &mlir::arith::detail::TruncFOpGenericAdaptorBase::Properties::setRoundingmode, "prop_value"_a) -.def("__eq__", &mlir::arith::detail::TruncFOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::arith::detail::TruncFOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_arith_TruncFOpAdaptor = nb::class_(m, "TruncFOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::TruncFOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_TruncFOp = nb::class_(m, "TruncFOp") -.def_static("attribute_names", &mlir::arith::TruncFOp::getAttributeNames) -.def_prop_ro("fastmath_attr_name", [](mlir::arith::TruncFOp& self){ return self.getFastmathAttrName(); }) -.def_static("get_fastmath_attr_name", [](mlir::OperationName name){ return mlir::arith::TruncFOp::getFastmathAttrName(name); }, "name"_a) -.def_prop_ro("roundingmode_attr_name", [](mlir::arith::TruncFOp& self){ return self.getRoundingmodeAttrName(); }) -.def_static("get_roundingmode_attr_name", [](mlir::OperationName name){ return mlir::arith::TruncFOp::getRoundingmodeAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::arith::TruncFOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::TruncFOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::TruncFOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::TruncFOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::TruncFOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::TruncFOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::TruncFOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::TruncFOp::getOut) -.def_static("set_properties_from_attr", &mlir::arith::TruncFOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::arith::TruncFOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::arith::TruncFOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::arith::TruncFOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::arith::TruncFOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::arith::TruncFOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::arith::TruncFOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::arith::TruncFOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::arith::TruncFOp::writeProperties, "writer"_a) -.def_prop_ro("roundingmode_attr", &mlir::arith::TruncFOp::getRoundingmodeAttr) -.def_prop_ro("roundingmode", &mlir::arith::TruncFOp::getRoundingmode) -.def_prop_ro("fastmath_attr", &mlir::arith::TruncFOp::getFastmathAttr) -.def_prop_ro("fastmath", &mlir::arith::TruncFOp::getFastmath) -.def("set_roundingmode_attr", &mlir::arith::TruncFOp::setRoundingmodeAttr, "attr"_a) -.def("set_roundingmode", &mlir::arith::TruncFOp::setRoundingmode, "attr_value"_a) -.def("set_fastmath_attr", &mlir::arith::TruncFOp::setFastmathAttr, "attr"_a) -.def("set_fastmath", &mlir::arith::TruncFOp::setFastmath, "attr_value"_a) -.def("remove_roundingmode_attr", &mlir::arith::TruncFOp::removeRoundingmodeAttr) -.def("remove_fastmath_attr", &mlir::arith::TruncFOp::removeFastmathAttr) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::TruncFOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in, mlir::arith::RoundingModeAttr roundingmode, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::TruncFOp::build(odsBuilder, odsState, out, in, roundingmode, fastmath); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a, "roundingmode"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in, mlir::arith::RoundingModeAttr roundingmode, mlir::arith::FastMathFlagsAttr fastmath){ return mlir::arith::TruncFOp::build(odsBuilder, odsState, resultTypes, in, roundingmode, fastmath); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a, "roundingmode"_a, "fastmath"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::TruncFOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::TruncFOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::TruncFOp::verifyInvariants) -.def("verify", &mlir::arith::TruncFOp::verify) -.def("fold", &mlir::arith::TruncFOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::TruncFOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::TruncFOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::TruncFOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_TruncFOp__ = nb::class_>(m, "TypeIDResolver[arith::TruncFOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::TruncFOp>::resolveTypeID) -; - -auto mlir_arith_detail_TruncIOpGenericAdaptorBase = nb::class_(m, "TruncIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::TruncIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::TruncIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_TruncIOpAdaptor = nb::class_(m, "TruncIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::TruncIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_TruncIOp = nb::class_(m, "TruncIOp") -.def_static("attribute_names", &mlir::arith::TruncIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::TruncIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::TruncIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::TruncIOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::TruncIOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::TruncIOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::TruncIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::TruncIOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::TruncIOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::TruncIOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::TruncIOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::TruncIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::TruncIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::TruncIOp::verifyInvariants) -.def("verify", &mlir::arith::TruncIOp::verify) -.def_static("get_canonicalization_patterns", &mlir::arith::TruncIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::TruncIOp::fold, "adaptor"_a) -.def("infer_result_ranges", &mlir::arith::TruncIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("are_cast_compatible", &mlir::arith::TruncIOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::TruncIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::TruncIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_TruncIOp__ = nb::class_>(m, "TypeIDResolver[arith::TruncIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::TruncIOp>::resolveTypeID) -; - -auto mlir_arith_detail_UIToFPOpGenericAdaptorBase = nb::class_(m, "UIToFPOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::UIToFPOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::UIToFPOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_UIToFPOpAdaptor = nb::class_(m, "UIToFPOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::UIToFPOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_UIToFPOp = nb::class_(m, "UIToFPOp") -.def_static("attribute_names", &mlir::arith::UIToFPOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::UIToFPOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::UIToFPOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::UIToFPOp::getODSOperands, "index"_a) -.def_prop_ro("in", &mlir::arith::UIToFPOp::getIn) -.def_prop_ro("in_mutable", &mlir::arith::UIToFPOp::getInMutable) -.def("get_ods_result_index_and_length", &mlir::arith::UIToFPOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::UIToFPOp::getODSResults, "index"_a) -.def_prop_ro("out", &mlir::arith::UIToFPOp::getOut) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type out, mlir::Value in){ return mlir::arith::UIToFPOp::build(odsBuilder, odsState, out, in); }, "ods_builder"_a, "ods_state"_a, "out"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value in){ return mlir::arith::UIToFPOp::build(odsBuilder, odsState, resultTypes, in); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "in"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::UIToFPOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::UIToFPOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::UIToFPOp::verifyInvariants) -.def("fold", &mlir::arith::UIToFPOp::fold, "adaptor"_a) -.def_static("are_cast_compatible", &mlir::arith::UIToFPOp::areCastCompatible, "inputs"_a, "outputs"_a) -.def_static("parse", &mlir::arith::UIToFPOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::UIToFPOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_UIToFPOp__ = nb::class_>(m, "TypeIDResolver[arith::UIToFPOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::UIToFPOp>::resolveTypeID) -; - -auto mlir_arith_detail_XOrIOpGenericAdaptorBase = nb::class_(m, "XOrIOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::XOrIOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::XOrIOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_XOrIOpAdaptor = nb::class_(m, "XOrIOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::XOrIOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_XOrIOp = nb::class_(m, "XOrIOp") -.def_static("attribute_names", &mlir::arith::XOrIOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::XOrIOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::XOrIOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::XOrIOp::getODSOperands, "index"_a) -.def_prop_ro("lhs", &mlir::arith::XOrIOp::getLhs) -.def_prop_ro("rhs", &mlir::arith::XOrIOp::getRhs) -.def_prop_ro("lhs_mutable", &mlir::arith::XOrIOp::getLhsMutable) -.def_prop_ro("rhs_mutable", &mlir::arith::XOrIOp::getRhsMutable) -.def("get_ods_result_index_and_length", &mlir::arith::XOrIOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::XOrIOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::XOrIOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::XOrIOp::build(odsBuilder, odsState, result, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::XOrIOp::build(odsBuilder, odsState, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value lhs, mlir::Value rhs){ return mlir::arith::XOrIOp::build(odsBuilder, odsState, resultTypes, lhs, rhs); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "lhs"_a, "rhs"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::XOrIOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::XOrIOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::arith::XOrIOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::XOrIOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::arith::XOrIOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::XOrIOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::XOrIOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges", &mlir::arith::XOrIOp::inferResultRanges, "arg_ranges"_a, "set_result_ranges"_a) -.def_static("parse", &mlir::arith::XOrIOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::arith::XOrIOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_XOrIOp__ = nb::class_>(m, "TypeIDResolver[arith::XOrIOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::XOrIOp>::resolveTypeID) -; - -auto mlir_arith_detail_SelectOpGenericAdaptorBase = nb::class_(m, "SelectOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::arith::detail::SelectOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::arith::detail::SelectOpGenericAdaptorBase::getAttributes) -; - -auto mlir_arith_SelectOpAdaptor = nb::class_(m, "SelectOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::arith::SelectOpAdaptor::verify, "loc"_a) -; - -auto mlir_arith_SelectOp = nb::class_(m, "SelectOp") -.def_static("attribute_names", &mlir::arith::SelectOp::getAttributeNames) -.def_static("operation_name", &mlir::arith::SelectOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::arith::SelectOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::arith::SelectOp::getODSOperands, "index"_a) -.def_prop_ro("condition", &mlir::arith::SelectOp::getCondition) -.def_prop_ro("true_value", &mlir::arith::SelectOp::getTrueValue) -.def_prop_ro("false_value", &mlir::arith::SelectOp::getFalseValue) -.def_prop_ro("condition_mutable", &mlir::arith::SelectOp::getConditionMutable) -.def_prop_ro("true_value_mutable", &mlir::arith::SelectOp::getTrueValueMutable) -.def_prop_ro("false_value_mutable", &mlir::arith::SelectOp::getFalseValueMutable) -.def("get_ods_result_index_and_length", &mlir::arith::SelectOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::arith::SelectOp::getODSResults, "index"_a) -.def_prop_ro("result", &mlir::arith::SelectOp::getResult) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Type result, mlir::Value condition, mlir::Value true_value, mlir::Value false_value){ return mlir::arith::SelectOp::build(odsBuilder, odsState, result, condition, true_value, false_value); }, "ods_builder"_a, "ods_state"_a, "result"_a, "condition"_a, "true_value"_a, "false_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value condition, mlir::Value true_value, mlir::Value false_value){ return mlir::arith::SelectOp::build(odsBuilder, odsState, condition, true_value, false_value); }, "ods_builder"_a, "ods_state"_a, "condition"_a, "true_value"_a, "false_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value condition, mlir::Value true_value, mlir::Value false_value){ return mlir::arith::SelectOp::build(odsBuilder, odsState, resultTypes, condition, true_value, false_value); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "condition"_a, "true_value"_a, "false_value"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SelectOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::arith::SelectOp::build(odsBuilder, odsState, operands, attributes); }, "ods_builder"_a, "ods_state"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::arith::SelectOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::arith::SelectOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::arith::SelectOp::verifyInvariants) -.def("verify", &mlir::arith::SelectOp::verify) -.def_static("get_canonicalization_patterns", &mlir::arith::SelectOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::arith::SelectOp::fold, "adaptor"_a) -.def_static("infer_return_types", &mlir::arith::SelectOp::inferReturnTypes, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def("infer_result_ranges_from_optional", &mlir::arith::SelectOp::inferResultRangesFromOptional, "arg_ranges"_a, "set_result_ranges"_a) -.def("get_effects", &mlir::arith::SelectOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_arith_SelectOp__ = nb::class_>(m, "TypeIDResolver[arith::SelectOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::arith::SelectOp>::resolveTypeID) -; - -} diff --git a/projects/eudsl-py/src/blacklists.py b/projects/eudsl-py/src/blacklists.py deleted file mode 100644 index 796048de..00000000 --- a/projects/eudsl-py/src/blacklists.py +++ /dev/null @@ -1,110 +0,0 @@ -class_blacklist = { - "mlir::AsmPrinter::Impl", - "mlir::OperationName::Impl", - "mlir::DialectRegistry", - # allocating an object of abstract class type - "mlir::AsmResourceParser", - "mlir::AsmResourcePrinter", - # object of type 'std::pair, std::unique_ptr>' cannot be assigned because its copy assignment operator is implicitly deleted - "mlir::FallbackAsmResourceMap", - # error: call to deleted constructor of 'std::unique_ptr' - "mlir::ParserConfig", - "mlir::SymbolTableCollection", - "mlir::PDLResultList", - # pure virtual - "mlir::AsmParser", - "mlir::AsmParser::CyclicParseReset", - # error: overload resolution selected deleted operator '=' - "mlir::PDLPatternConfigSet", - # wack - # call to deleted constructor of 'std::unique_ptr' - "mlir::OperationState", - "mlir::FallbackAsmResourceMap::OpaqueAsmResource", - # wrong base class - # "collision on `value` method with ConstantOp - "mlir::arith::ConstantIntOp", - "mlir::arith::ConstantFloatOp", - "mlir::arith::ConstantIndexOp", -} - -fn_blacklist = { - "getImpl()", - "getAsOpaquePointer()", - "getFromOpaquePointer(const void *)", - "WalkResult(ResultEnum)", - "initChainWithUse(IROperandBase **)", - "AsmPrinter(Impl &)", - "insert(std::unique_ptr, ArrayRef)", - # these are all collisions with templated overloads - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ::mlir::MLIRContext *, Type, int64_t, ::llvm::ArrayRef)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, unsigned int, ArrayRef)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, const APFloat &)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, double)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, const APInt &)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ::mlir::MLIRContext *, const APSInt &)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, int64_t)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, StringAttr, StringRef, Type)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ShapedType, DenseElementsAttr, DenseElementsAttr)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ::mlir::MLIRContext *, int64_t, ::llvm::ArrayRef)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ::mlir::MLIRContext *, unsigned int, SignednessSemantics)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ArrayRef, Type, MemRefLayoutAttrInterface, Attribute)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ArrayRef, Type, AffineMap, Attribute)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ArrayRef, Type, AffineMap, unsigned int)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, StringAttr, StringRef)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ArrayRef, Type, Attribute)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, Attribute)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type, unsigned int)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, Type)", - "getChecked(::llvm::function_ref< ::mlir::InFlightDiagnostic ()>, ArrayRef, Type, ArrayRef)", - "getChecked(function_ref, DynamicAttrDefinition *, ArrayRef)", - "getChecked(function_ref, DynamicTypeDefinition *, ArrayRef)", - "get(ShapedType, StringRef, AsmResourceBlob)", - "processAsArg(StringAttr)", - # mlir::SparseElementsAttr::getValues - "getValues()", - "registerHandler(HandlerTy)", - "emitDiagnostic(Location, Twine, DiagnosticSeverity, bool)", - "operator++()", - "clone(::mlir::Type)", - "printFunctionalType(Operation *)", - "print(::mlir::OpAsmPrinter &)", - "insert(StringRef, std::optional)", - # incomplete types - "AffineBinaryOpExpr(AffineExpr::ImplType *)", - "AffineDimExpr(AffineExpr::ImplType *)", - "AffineSymbolExpr(AffineExpr::ImplType *)", - "AffineConstantExpr(AffineExpr::ImplType *)", - "AffineExpr(const ImplType *)", - "AffineMap(ImplType *)", - "IntegerSet(ImplType *)", - "Type(const ImplType *)", - "Attribute(const ImplType *)", - "Location(const LocationAttr::ImplType *)", - "parseFloat(const llvm::fltSemantics &, APFloat &)", - "getFloatSemantics()", - # const char* - "convertEndianOfCharForBEmachine(const char *, char *, size_t, size_t)", - "parseKeywordType(const char *, Type &)", - # no matching function for call to object of type 'const std::remove_reference_t - "parseOptionalRegion(std::unique_ptr &, ArrayRef, bool)", - "parseSuccessor(Block *&)", - "parseOptionalSuccessor(Block *&)", - "parseSuccessorAndUseList(Block *&, SmallVectorImpl &)", - # call to implicitly-deleted default constructor of - # call to deleted constructor - "NamedAttrList(std::nullopt_t)", - "OptionalParseResult(std::nullopt_t)", - "OpPrintingFlags(std::nullopt_t)", - "AsmResourceBlob(ArrayRef, size_t, DeleterFn, bool)", - "allocateWithAlign(ArrayRef, size_t, AsmResourceBlob::DeleterFn, bool)", - "AsmResourceBlob(const AsmResourceBlob &)", - "InsertionGuard(const InsertionGuard &)", - "CyclicPrintReset(const CyclicPrintReset &)", - "CyclicParseReset(const CyclicParseReset &)", - "PDLPatternModule(OwningOpRef)", - # something weird - linker error - missing symbol in libMLIR.a - # probably flags? - "parseAssembly(OpAsmParser &, OperationState &)", - "getPredicateByName(StringRef)", -} diff --git a/projects/eudsl-py/src/cf.cpp b/projects/eudsl-py/src/cf.cpp deleted file mode 100644 index 6159dfde..00000000 --- a/projects/eudsl-py/src/cf.cpp +++ /dev/null @@ -1,289 +0,0 @@ - -#include "ir.h" -#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h" -#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h" -namespace nb = nanobind; -using namespace nb::literals; -void populateControlFlowModule(nanobind::module_ & m) { -using namespace mlir; -using namespace mlir::detail; -using namespace mlir::cf; - -auto mlir_cf_ControlFlowDialect = nb::class_(m, "ControlFlowDialect") -.def_static("dialect_namespace", &mlir::cf::ControlFlowDialect::getDialectNamespace) -.def_static("insert_into_registry", [](mlir::DialectRegistry ®istry) { registry.insert(); }) -.def_static("load_into_context", [](mlir::MLIRContext &context) { return context.getOrLoadDialect(); }) -; - -auto mlir_detail_TypeIDResolver___mlir_cf_ControlFlowDialect__ = nb::class_>(m, "TypeIDResolver[cf::ControlFlowDialect]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::cf::ControlFlowDialect>::resolveTypeID) -; - -auto mlir_cf_detail_AssertOpGenericAdaptorBase = nb::class_(m, "AssertOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::cf::detail::AssertOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::cf::detail::AssertOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::cf::detail::AssertOpGenericAdaptorBase::getAttributes) -.def_prop_ro("msg_attr", &mlir::cf::detail::AssertOpGenericAdaptorBase::getMsgAttr) -.def_prop_ro("msg", &mlir::cf::detail::AssertOpGenericAdaptorBase::getMsg) -; - -auto mlir_cf_detail_AssertOpGenericAdaptorBase_Properties = nb::class_(mlir_cf_detail_AssertOpGenericAdaptorBase, "Properties") -.def_prop_ro("msg", &mlir::cf::detail::AssertOpGenericAdaptorBase::Properties::getMsg) -.def("set_msg", &mlir::cf::detail::AssertOpGenericAdaptorBase::Properties::setMsg, "prop_value"_a) -.def("__eq__", &mlir::cf::detail::AssertOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::cf::detail::AssertOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_cf_AssertOpAdaptor = nb::class_(m, "AssertOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::cf::AssertOpAdaptor::verify, "loc"_a) -; - -auto mlir_cf_AssertOp = nb::class_(m, "AssertOp") -.def_static("attribute_names", &mlir::cf::AssertOp::getAttributeNames) -.def_prop_ro("msg_attr_name", [](mlir::cf::AssertOp& self){ return self.getMsgAttrName(); }) -.def_static("get_msg_attr_name", [](mlir::OperationName name){ return mlir::cf::AssertOp::getMsgAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::cf::AssertOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::cf::AssertOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::cf::AssertOp::getODSOperands, "index"_a) -.def_prop_ro("arg", &mlir::cf::AssertOp::getArg) -.def_prop_ro("arg_mutable", &mlir::cf::AssertOp::getArgMutable) -.def("get_ods_result_index_and_length", &mlir::cf::AssertOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::cf::AssertOp::getODSResults, "index"_a) -.def_static("set_properties_from_attr", &mlir::cf::AssertOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::cf::AssertOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::cf::AssertOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::cf::AssertOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::cf::AssertOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::cf::AssertOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::cf::AssertOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::cf::AssertOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::cf::AssertOp::writeProperties, "writer"_a) -.def_prop_ro("msg_attr", &mlir::cf::AssertOp::getMsgAttr) -.def_prop_ro("msg", &mlir::cf::AssertOp::getMsg) -.def("set_msg_attr", &mlir::cf::AssertOp::setMsgAttr, "attr"_a) -.def("set_msg", &mlir::cf::AssertOp::setMsg, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value arg, mlir::StringAttr msg){ return mlir::cf::AssertOp::build(odsBuilder, odsState, arg, msg); }, "ods_builder"_a, "ods_state"_a, "arg"_a, "msg"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value arg, mlir::StringAttr msg){ return mlir::cf::AssertOp::build(odsBuilder, odsState, resultTypes, arg, msg); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "arg"_a, "msg"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value arg, llvm::StringRef msg){ return mlir::cf::AssertOp::build(odsBuilder, odsState, arg, msg); }, "ods_builder"_a, "ods_state"_a, "arg"_a, "msg"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value arg, llvm::StringRef msg){ return mlir::cf::AssertOp::build(odsBuilder, odsState, resultTypes, arg, msg); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "arg"_a, "msg"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::cf::AssertOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::cf::AssertOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::cf::AssertOp::verifyInvariants) -.def_static("canonicalize", &mlir::cf::AssertOp::canonicalize, "op"_a, "rewriter"_a) -.def_static("get_canonicalization_patterns", &mlir::cf::AssertOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_effects", &mlir::cf::AssertOp::getEffects, "effects"_a) -.def_static("parse", &mlir::cf::AssertOp::parse, "parser"_a, "result"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_cf_AssertOp__ = nb::class_>(m, "TypeIDResolver[cf::AssertOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::cf::AssertOp>::resolveTypeID) -; - -auto mlir_cf_detail_BranchOpGenericAdaptorBase = nb::class_(m, "BranchOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::cf::detail::BranchOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::cf::detail::BranchOpGenericAdaptorBase::getAttributes) -; - -auto mlir_cf_BranchOpAdaptor = nb::class_(m, "BranchOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::cf::BranchOpAdaptor::verify, "loc"_a) -; - -auto mlir_cf_BranchOp = nb::class_(m, "BranchOp") -.def_static("attribute_names", &mlir::cf::BranchOp::getAttributeNames) -.def_static("operation_name", &mlir::cf::BranchOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::cf::BranchOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::cf::BranchOp::getODSOperands, "index"_a) -.def_prop_ro("dest_operands", &mlir::cf::BranchOp::getDestOperands) -.def_prop_ro("dest_operands_mutable", &mlir::cf::BranchOp::getDestOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::cf::BranchOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::cf::BranchOp::getODSResults, "index"_a) -.def_prop_ro("dest", &mlir::cf::BranchOp::getDest) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Block * dest, mlir::ValueRange destOperands){ return mlir::cf::BranchOp::build(odsBuilder, odsState, dest, destOperands); }, "ods_builder"_a, "ods_state"_a, "dest"_a, "dest_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange destOperands, mlir::Block * dest){ return mlir::cf::BranchOp::build(odsBuilder, odsState, destOperands, dest); }, "ods_builder"_a, "ods_state"_a, "dest_operands"_a, "dest"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange destOperands, mlir::Block * dest){ return mlir::cf::BranchOp::build(odsBuilder, odsState, resultTypes, destOperands, dest); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "dest_operands"_a, "dest"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::cf::BranchOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::cf::BranchOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::cf::BranchOp::verifyInvariants) -.def_static("canonicalize", &mlir::cf::BranchOp::canonicalize, "op"_a, "rewriter"_a) -.def_static("get_canonicalization_patterns", &mlir::cf::BranchOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_successor_operands", &mlir::cf::BranchOp::getSuccessorOperands, "index"_a) -.def("get_successor_for_operands", &mlir::cf::BranchOp::getSuccessorForOperands, "operands"_a, nb::rv_policy::reference_internal) -.def_static("parse", &mlir::cf::BranchOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::cf::BranchOp::getEffects, "effects"_a) -.def("set_dest", &mlir::cf::BranchOp::setDest, "block"_a) -.def("erase_operand", &mlir::cf::BranchOp::eraseOperand, "index"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_cf_BranchOp__ = nb::class_>(m, "TypeIDResolver[cf::BranchOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::cf::BranchOp>::resolveTypeID) -; - -auto mlir_cf_detail_CondBranchOpGenericAdaptorBase = nb::class_(m, "CondBranchOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::getAttributes) -; - -auto mlir_cf_detail_CondBranchOpGenericAdaptorBase_Properties = nb::class_(mlir_cf_detail_CondBranchOpGenericAdaptorBase, "Properties") -.def_prop_ro("operand_segment_sizes", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::Properties::getOperandSegmentSizes) -.def("set_operand_segment_sizes", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::Properties::setOperandSegmentSizes, "prop_value"_a) -.def("__eq__", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::cf::detail::CondBranchOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_cf_CondBranchOpAdaptor = nb::class_(m, "CondBranchOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::cf::CondBranchOpAdaptor::verify, "loc"_a) -; - -auto mlir_cf_CondBranchOp = nb::class_(m, "CondBranchOp") -.def_static("attribute_names", &mlir::cf::CondBranchOp::getAttributeNames) -.def_prop_ro("operand_segment_sizes_attr_name", [](mlir::cf::CondBranchOp& self){ return self.getOperandSegmentSizesAttrName(); }) -.def_static("get_operand_segment_sizes_attr_name", [](mlir::OperationName name){ return mlir::cf::CondBranchOp::getOperandSegmentSizesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::cf::CondBranchOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::cf::CondBranchOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::cf::CondBranchOp::getODSOperands, "index"_a) -.def_prop_ro("condition", &mlir::cf::CondBranchOp::getCondition) -.def_prop_ro("true_dest_operands", &mlir::cf::CondBranchOp::getTrueDestOperands) -.def_prop_ro("false_dest_operands", &mlir::cf::CondBranchOp::getFalseDestOperands) -.def_prop_ro("condition_mutable", &mlir::cf::CondBranchOp::getConditionMutable) -.def_prop_ro("true_dest_operands_mutable", &mlir::cf::CondBranchOp::getTrueDestOperandsMutable) -.def_prop_ro("false_dest_operands_mutable", &mlir::cf::CondBranchOp::getFalseDestOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::cf::CondBranchOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::cf::CondBranchOp::getODSResults, "index"_a) -.def_prop_ro("true_dest", &mlir::cf::CondBranchOp::getTrueDest) -.def_prop_ro("false_dest", &mlir::cf::CondBranchOp::getFalseDest) -.def_static("set_properties_from_attr", &mlir::cf::CondBranchOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::cf::CondBranchOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::cf::CondBranchOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::cf::CondBranchOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::cf::CondBranchOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::cf::CondBranchOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::cf::CondBranchOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::cf::CondBranchOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::cf::CondBranchOp::writeProperties, "writer"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value condition, mlir::Block * trueDest, mlir::ValueRange trueOperands, mlir::Block * falseDest, mlir::ValueRange falseOperands){ return mlir::cf::CondBranchOp::build(odsBuilder, odsState, condition, trueDest, trueOperands, falseDest, falseOperands); }, "ods_builder"_a, "ods_state"_a, "condition"_a, "true_dest"_a, "true_operands"_a, "false_dest"_a, "false_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value condition, mlir::Block * trueDest, mlir::Block * falseDest, mlir::ValueRange falseOperands){ return mlir::cf::CondBranchOp::build(odsBuilder, odsState, condition, trueDest, falseDest, falseOperands); }, "ods_builder"_a, "ods_state"_a, "condition"_a, "true_dest"_a, "false_dest"_a, "false_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value condition, mlir::ValueRange trueDestOperands, mlir::ValueRange falseDestOperands, mlir::Block * trueDest, mlir::Block * falseDest){ return mlir::cf::CondBranchOp::build(odsBuilder, odsState, condition, trueDestOperands, falseDestOperands, trueDest, falseDest); }, "ods_builder"_a, "ods_state"_a, "condition"_a, "true_dest_operands"_a, "false_dest_operands"_a, "true_dest"_a, "false_dest"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value condition, mlir::ValueRange trueDestOperands, mlir::ValueRange falseDestOperands, mlir::Block * trueDest, mlir::Block * falseDest){ return mlir::cf::CondBranchOp::build(odsBuilder, odsState, resultTypes, condition, trueDestOperands, falseDestOperands, trueDest, falseDest); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "condition"_a, "true_dest_operands"_a, "false_dest_operands"_a, "true_dest"_a, "false_dest"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::cf::CondBranchOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::cf::CondBranchOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::cf::CondBranchOp::verifyInvariants) -.def_static("get_canonicalization_patterns", &mlir::cf::CondBranchOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_successor_operands", &mlir::cf::CondBranchOp::getSuccessorOperands, "index"_a) -.def("get_successor_for_operands", &mlir::cf::CondBranchOp::getSuccessorForOperands, "operands"_a, nb::rv_policy::reference_internal) -.def_static("parse", &mlir::cf::CondBranchOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::cf::CondBranchOp::getEffects, "effects"_a) -.def("get_true_operand", &mlir::cf::CondBranchOp::getTrueOperand, "idx"_a) -.def("set_true_operand", &mlir::cf::CondBranchOp::setTrueOperand, "idx"_a, "value"_a) -.def_prop_ro("num_true_operands", &mlir::cf::CondBranchOp::getNumTrueOperands) -.def("erase_true_operand", &mlir::cf::CondBranchOp::eraseTrueOperand, "index"_a) -.def("get_false_operand", &mlir::cf::CondBranchOp::getFalseOperand, "idx"_a) -.def("set_false_operand", &mlir::cf::CondBranchOp::setFalseOperand, "idx"_a, "value"_a) -.def_prop_ro("true_operands", &mlir::cf::CondBranchOp::getTrueOperands) -.def_prop_ro("false_operands", &mlir::cf::CondBranchOp::getFalseOperands) -.def_prop_ro("num_false_operands", &mlir::cf::CondBranchOp::getNumFalseOperands) -.def("erase_false_operand", &mlir::cf::CondBranchOp::eraseFalseOperand, "index"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_cf_CondBranchOp__ = nb::class_>(m, "TypeIDResolver[cf::CondBranchOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::cf::CondBranchOp>::resolveTypeID) -; - -auto mlir_cf_detail_SwitchOpGenericAdaptorBase = nb::class_(m, "SwitchOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getAttributes) -.def_prop_ro("case_values_attr", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getCaseValuesAttr) -.def_prop_ro("case_values", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getCaseValues) -.def_prop_ro("case_operand_segments_attr", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getCaseOperandSegmentsAttr) -.def_prop_ro("case_operand_segments", &mlir::cf::detail::SwitchOpGenericAdaptorBase::getCaseOperandSegments) -; - -auto mlir_cf_detail_SwitchOpGenericAdaptorBase_Properties = nb::class_(mlir_cf_detail_SwitchOpGenericAdaptorBase, "Properties") -.def_prop_ro("case_operand_segments", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::getCaseOperandSegments) -.def("set_case_operand_segments", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::setCaseOperandSegments, "prop_value"_a) -.def_prop_ro("case_values", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::getCaseValues) -.def("set_case_values", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::setCaseValues, "prop_value"_a) -.def_prop_ro("operand_segment_sizes", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::getOperandSegmentSizes) -.def("set_operand_segment_sizes", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::setOperandSegmentSizes, "prop_value"_a) -.def("__eq__", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::cf::detail::SwitchOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_cf_SwitchOpAdaptor = nb::class_(m, "SwitchOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::cf::SwitchOpAdaptor::verify, "loc"_a) -; - -auto mlir_cf_SwitchOp = nb::class_(m, "SwitchOp") -.def_static("attribute_names", &mlir::cf::SwitchOp::getAttributeNames) -.def_prop_ro("case_operand_segments_attr_name", [](mlir::cf::SwitchOp& self){ return self.getCaseOperandSegmentsAttrName(); }) -.def_static("get_case_operand_segments_attr_name", [](mlir::OperationName name){ return mlir::cf::SwitchOp::getCaseOperandSegmentsAttrName(name); }, "name"_a) -.def_prop_ro("case_values_attr_name", [](mlir::cf::SwitchOp& self){ return self.getCaseValuesAttrName(); }) -.def_static("get_case_values_attr_name", [](mlir::OperationName name){ return mlir::cf::SwitchOp::getCaseValuesAttrName(name); }, "name"_a) -.def_prop_ro("operand_segment_sizes_attr_name", [](mlir::cf::SwitchOp& self){ return self.getOperandSegmentSizesAttrName(); }) -.def_static("get_operand_segment_sizes_attr_name", [](mlir::OperationName name){ return mlir::cf::SwitchOp::getOperandSegmentSizesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::cf::SwitchOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::cf::SwitchOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::cf::SwitchOp::getODSOperands, "index"_a) -.def_prop_ro("flag", &mlir::cf::SwitchOp::getFlag) -.def_prop_ro("default_operands", &mlir::cf::SwitchOp::getDefaultOperands) -.def_prop_ro("case_operands", [](mlir::cf::SwitchOp& self){ return self.getCaseOperands(); }) -.def_prop_ro("flag_mutable", &mlir::cf::SwitchOp::getFlagMutable) -.def_prop_ro("default_operands_mutable", &mlir::cf::SwitchOp::getDefaultOperandsMutable) -.def_prop_ro("case_operands_mutable", [](mlir::cf::SwitchOp& self){ return self.getCaseOperandsMutable(); }) -.def("get_ods_result_index_and_length", &mlir::cf::SwitchOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::cf::SwitchOp::getODSResults, "index"_a) -.def_prop_ro("default_destination", &mlir::cf::SwitchOp::getDefaultDestination) -.def_prop_ro("case_destinations", &mlir::cf::SwitchOp::getCaseDestinations) -.def_static("set_properties_from_attr", &mlir::cf::SwitchOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::cf::SwitchOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::cf::SwitchOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::cf::SwitchOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::cf::SwitchOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::cf::SwitchOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::cf::SwitchOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::cf::SwitchOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::cf::SwitchOp::writeProperties, "writer"_a) -.def_prop_ro("case_values_attr", &mlir::cf::SwitchOp::getCaseValuesAttr) -.def_prop_ro("case_values", &mlir::cf::SwitchOp::getCaseValues) -.def_prop_ro("case_operand_segments_attr", &mlir::cf::SwitchOp::getCaseOperandSegmentsAttr) -.def_prop_ro("case_operand_segments", &mlir::cf::SwitchOp::getCaseOperandSegments) -.def("set_case_values_attr", &mlir::cf::SwitchOp::setCaseValuesAttr, "attr"_a) -.def("set_case_operand_segments_attr", &mlir::cf::SwitchOp::setCaseOperandSegmentsAttr, "attr"_a) -.def("set_case_operand_segments", &mlir::cf::SwitchOp::setCaseOperandSegments, "attr_value"_a) -.def("remove_case_values_attr", &mlir::cf::SwitchOp::removeCaseValuesAttr) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value flag, mlir::Block * defaultDestination, mlir::ValueRange defaultOperands, llvm::ArrayRef caseValues, mlir::BlockRange caseDestinations, llvm::ArrayRef caseOperands){ return mlir::cf::SwitchOp::build(odsBuilder, odsState, flag, defaultDestination, defaultOperands, caseValues, caseDestinations, caseOperands); }, "ods_builder"_a, "ods_state"_a, "flag"_a, "default_destination"_a, "default_operands"_a, "case_values"_a, "case_destinations"_a, "case_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value flag, mlir::Block * defaultDestination, mlir::ValueRange defaultOperands, ArrayRef caseValues, mlir::BlockRange caseDestinations, llvm::ArrayRef caseOperands){ return mlir::cf::SwitchOp::build(odsBuilder, odsState, flag, defaultDestination, defaultOperands, caseValues, caseDestinations, caseOperands); }, "ods_builder"_a, "ods_state"_a, "flag"_a, "default_destination"_a, "default_operands"_a, "case_values"_a, "case_destinations"_a, "case_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value flag, mlir::Block * defaultDestination, mlir::ValueRange defaultOperands, mlir::DenseIntElementsAttr caseValues, mlir::BlockRange caseDestinations, llvm::ArrayRef caseOperands){ return mlir::cf::SwitchOp::build(odsBuilder, odsState, flag, defaultDestination, defaultOperands, caseValues, caseDestinations, caseOperands); }, "ods_builder"_a, "ods_state"_a, "flag"_a, "default_destination"_a, "default_operands"_a, "case_values"_a, "case_destinations"_a, "case_operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value flag, mlir::ValueRange defaultOperands, llvm::ArrayRef caseOperands, mlir::DenseIntElementsAttr case_values, mlir::Block * defaultDestination, mlir::BlockRange caseDestinations){ return mlir::cf::SwitchOp::build(odsBuilder, odsState, flag, defaultOperands, caseOperands, case_values, defaultDestination, caseDestinations); }, "ods_builder"_a, "ods_state"_a, "flag"_a, "default_operands"_a, "case_operands"_a, "case_values"_a, "default_destination"_a, "case_destinations"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value flag, mlir::ValueRange defaultOperands, llvm::ArrayRef caseOperands, mlir::DenseIntElementsAttr case_values, mlir::Block * defaultDestination, mlir::BlockRange caseDestinations){ return mlir::cf::SwitchOp::build(odsBuilder, odsState, resultTypes, flag, defaultOperands, caseOperands, case_values, defaultDestination, caseDestinations); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "flag"_a, "default_operands"_a, "case_operands"_a, "case_values"_a, "default_destination"_a, "case_destinations"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::cf::SwitchOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::cf::SwitchOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::cf::SwitchOp::verifyInvariants) -.def("verify", &mlir::cf::SwitchOp::verify) -.def_static("get_canonicalization_patterns", &mlir::cf::SwitchOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_successor_operands", &mlir::cf::SwitchOp::getSuccessorOperands, "index"_a) -.def("get_successor_for_operands", &mlir::cf::SwitchOp::getSuccessorForOperands, "operands"_a, nb::rv_policy::reference_internal) -.def_static("parse", &mlir::cf::SwitchOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::cf::SwitchOp::getEffects, "effects"_a) -.def("get_case_operands", [](mlir::cf::SwitchOp& self, unsigned int index){ return self.getCaseOperands(index); }, "index"_a) -.def("get_case_operands_mutable", [](mlir::cf::SwitchOp& self, unsigned int index){ return self.getCaseOperandsMutable(index); }, "index"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_cf_SwitchOp__ = nb::class_>(m, "TypeIDResolver[cf::SwitchOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::cf::SwitchOp>::resolveTypeID) -; - -} diff --git a/projects/eudsl-py/src/generate.py b/projects/eudsl-py/src/generate.py deleted file mode 100644 index b6387e4a..00000000 --- a/projects/eudsl-py/src/generate.py +++ /dev/null @@ -1,740 +0,0 @@ -import ctypes -import glob -import os -import platform -import sysconfig -import warnings -from collections import defaultdict -from logging import warning -from pathlib import Path -from tempfile import TemporaryFile, NamedTemporaryFile -from textwrap import dedent - -import clang.cindex -import inflection -import nanobind -from clang.cindex import ( - CursorKind, - Cursor, - Type, - TranslationUnit, - AccessSpecifier, - TypeKind, - Index, - _CXUnsavedFile, - conf, - c_object_p, - c_interop_string, -) -from ctypes import c_char_p, c_void_p -from blacklists import fn_blacklist, class_blacklist - -if os.path.exists( - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib" -): - clang.cindex.Config.set_library_file( - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib" - ) -elif os.path.exists("/usr/lib/x86_64-linux-gnu/libclang-20.so.20"): - clang.cindex.Config.set_library_file("/usr/lib/x86_64-linux-gnu/libclang-20.so.20") -else: - raise RuntimeError("unknown location for libclang") - -THIS_DIR = Path(__file__).parent -filename = THIS_DIR / "eudsl_ext.cpp" -LLVM_INSTALL_DIR = os.getenv( - "LLVM_INSTALL_DIR", THIS_DIR.parent.parent.parent / "llvm-install" -) -comp_args = [ - f"-I{LLVM_INSTALL_DIR / 'include'}", - f"-I{sysconfig.get_paths()['include']}", - f"-I{nanobind.include_dir()}", - # "-std=c++17", - "-std=c++17", - "-fsyntax-only", - "-fdirectives-only", -] -if platform.system() == "Darwin": - comp_args.extend( - [ - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk", - ] - ) - -clang.cindex.register_function( - conf.lib, - ( - "clang_parseTranslationUnit2", - [ - Index, - clang.cindex.c_interop_string, - c_void_p, - ctypes.c_int, - c_void_p, - ctypes.c_int, - ctypes.c_int, - c_void_p, - ], - ctypes.c_uint, - ), - False, -) - - -def b(x): - if isinstance(x, bytes): - return x - return x.encode("utf-8") - - -def from_source(filename, args=None, unsaved_files=None, options=0, index=None): - if args is None: - args = [] - - if unsaved_files is None: - unsaved_files = [] - - if index is None: - index = Index.create() - - args_array = None - if len(args) > 0: - args_array = (c_char_p * len(args))(*[b(x) for x in args]) - - unsaved_array = None - if len(unsaved_files) > 0: - unsaved_array = (_CXUnsavedFile * len(unsaved_files))() - for i, (name, contents) in enumerate(unsaved_files): - if hasattr(contents, "read"): - contents = contents.read() - unsaved_array[i].name = c_interop_string(name) - unsaved_array[i].contents = c_interop_string(contents) - unsaved_array[i].length = len(unsaved_array[i].contents) - - tu = c_object_p() - err_code = conf.lib.clang_parseTranslationUnit2( - index, - os.fspath(filename) if filename is not None else None, - args_array, - len(args), - unsaved_array, - len(unsaved_files), - options, - ctypes.byref(tu), - ) - if err_code: - match err_code: - case 1: - raise RuntimeError("CXError_Failure") - case 2: - raise RuntimeError("CXError_Crashed") - case 3: - raise RuntimeError("CXError_InvalidArguments") - case 4: - raise RuntimeError("CXError_ASTReadError") - - tu = TranslationUnit(tu, index) - for d in tu.diagnostics: - print(d) - - return tu - - -def parse_file(filepath): - tu = from_source( - filepath, - comp_args, - options=TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD - | TranslationUnit.PARSE_INCOMPLETE - | TranslationUnit.PARSE_SKIP_FUNCTION_BODIES, - ) - return tu - - -def parse_files(source_files: list[Path]): - with NamedTemporaryFile(mode="w", suffix=".hpp") as t: - for s in source_files: - t.write(f'#include "{s}"\n') - t.flush() - tu = parse_file(t.name) - return tu - - -def parse_directory(dir_): - source_files = [ - dir_ / p for p in glob.glob("**/*.h", root_dir=dir_, recursive=True) - ] - return parse_files(source_files) - - -def get_canonical_type(node: Cursor): - return node.type.get_canonical().spelling - - -def collect_methods_for_class(class_node: Cursor): - assert class_node.kind in {CursorKind.CLASS_DECL, CursorKind.STRUCT_DECL} - - def visitor(node: Cursor, parent: Cursor, class_being_visited_methods): - class_being_visited, methods = class_being_visited_methods - if ( - node.kind - in { - CursorKind.CXX_METHOD, - CursorKind.CONSTRUCTOR, - CursorKind.FUNCTION_TEMPLATE, - } - and node.access_specifier == AccessSpecifier.PUBLIC - and get_canonical_type(parent) == class_being_visited - ): - is_getter = ( - node.displayname.startswith("get") - and len(list(node.get_arguments())) == 0 - ) - fn_name = node.displayname.split("(")[0] - methods[fn_name].append( - {"is_static": node.is_static_method(), "is_getter": is_getter} - ) - - return 1 # means continue adjacent - - methods = defaultdict(list) - conf.lib.clang_visitChildren( - class_node, - clang.cindex.callbacks["cursor_visit"](visitor), - (get_canonical_type(class_node), methods), - ) - return methods - - -renames = {"from": "from_", "except": "except_"} - - -def get_default_val(node: Cursor, parent, defaults): - defaults.append(node) - return 2 - - -def parse_literal(cursor): - value = "".join([str(t.spelling) for t in cursor.get_tokens()]) - if cursor.kind == CursorKind.STRING_LITERAL: - value = "'" + value[1:-1] + "'" # prefer single quotes - # value = 'b' + value # Ensure byte string for compatibility - return value - - -def parse_parameter(cursor): - name = cursor.spelling - default_value = None - annotation = None - for child in cursor.get_children(): - if child.kind == CursorKind.TYPE_REF: - # the type of the param - pass - elif child.kind == CursorKind.UNEXPOSED_EXPR: - for gc in child.get_children(): - if gc.kind == CursorKind.CXX_NULL_PTR_LITERAL_EXPR: - default_value = None - elif gc.kind == CursorKind.INTEGER_LITERAL: - val = parse_literal(gc) - if val.endswith("L"): - val = val[:-1] - if cursor.type.kind == TypeKind.POINTER and int(val) == 0: - default_value = None - else: - default_value = f"{int(val)}" - elif len(gc.spelling) > 0: - default_value = gc.spelling - elif gc.kind == CursorKind.CXX_UNARY_EXPR: - # default value is some expression - # so jam the tokens together, and hope it's interpretable by python - # unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) - tokens = "".join([t.spelling for t in gc.get_tokens()]) - default_value = tokens - else: - raise NotImplementedError(f"unparsed {gc.kind}") - elif child.kind == CursorKind.CXX_BOOL_LITERAL_EXPR: - bool_val = str(next(child.get_tokens()).spelling) - default_value = str(bool_val == "true") - elif child.kind == CursorKind.ANNOTATE_ATTR: - annotation = child.spelling - elif child.kind == CursorKind.DECL_REF_EXPR: - default_value = f"{child.type.get_canonical().spelling}::{child.spelling}" - elif child.kind == CursorKind.NAMESPACE_REF: - pass # probably on the parameter type - else: - raise NotImplementedError(f"unparsed {child.kind}") - return dict( - name=name, - type_=cursor.type, - # docstring=clean_comment(cursor), - default_value=default_value, - annotation=annotation, - ) - - -def get_public_supers(node: Cursor, parent, supers): - if node.kind == CursorKind.CXX_BASE_SPECIFIER: - supers.append(node) - # print(node.spelling, node.is_definition(), node.kind, parent.spelling) - return 1 # don't recurse so you won't hit nested classes - - -def emit_enum_values(node: clang.cindex.Cursor, _parent, FILE): - print( - f'.value("{node.spelling}", {node.type.spelling}::{node.spelling})', file=FILE - ) - return 1 # means continue visiting adjacent - - -def get_all_classes_enums_structs(tu: TranslationUnit, file_match_string): - all_classes_enums_structs = set() - for node in tu.cursor.walk_preorder(): - node: Cursor - ty: Type = node.type - if not ( - node.kind in {CursorKind.CLASS_DECL, CursorKind.STRUCT_DECL} - and node.is_definition() - and ty.spelling.startswith("mlir") - and node.access_specifier - not in {AccessSpecifier.PRIVATE, AccessSpecifier.PROTECTED} - and file_match_string in node.location.file.name - and get_canonical_type(node) not in class_blacklist - ): - continue - all_classes_enums_structs.add(get_canonical_type(node)) - - return all_classes_enums_structs - - -def emit_class_members(node: Cursor, parent: Cursor, counts_class_being_visited_FILE): - class_being_visited, counts, FILE = counts_class_being_visited_FILE - if not ( - node.kind in {CursorKind.CXX_METHOD, CursorKind.CONSTRUCTOR} - and node.access_specifier == AccessSpecifier.PUBLIC - and get_canonical_type(parent) == class_being_visited - and node.displayname not in fn_blacklist - ): - return 2 - - arg_names = [] - arg_types = [] - for i, a in enumerate(node.get_arguments()): - t: Type = a.type - t_parent = t.get_declaration().semantic_parent - if t_parent and parent and t_parent == parent: - t_spelling = t.get_named_type().spelling - elif "_t" not in t.spelling: - t_spelling = get_canonical_type(a) - else: - t_spelling = t.spelling - - arg_types.append(t_spelling) - - a_name = a.displayname - if a_name in renames: - a_name = renames[a_name] - if not len(a_name): - a_name = "_" * (i + 1) - arg_names.append(a_name) - - fq_name = get_canonical_type(parent) - is_getter = ( - node.displayname.startswith("get") and len(list(node.get_arguments())) == 0 - ) - - returns_ref = returns_ptr = False - if node.kind == CursorKind.CONSTRUCTOR: - func_ref = f"nb::init<{', '.join(arg_types)}>()" - nb_fn_name = "" - else: - fn_name = node.displayname.split("(")[0] - - returns_ref = node.type.get_result().spelling[-1] == "&" - returns_ptr = node.type.get_result().spelling[-1] == "*" - - if len(counts[fn_name]) > 1: - if arg_names: - typed_args = ", ".join( - [f"{t} {a}" for t, a in zip(arg_types, arg_names)] - ) - else: - typed_args = "" - new_arg_names = arg_names[:] - for i, a in enumerate(new_arg_names): - t = arg_types[i] - if ("std::unique_ptr" in t and t[-1] != "&") or "&&" in t: - new_arg_names[i] = f"std::move({a})" - - if node.is_static_method(): - func_ref = f"[]({typed_args}){{ return {'&' if returns_ref else ''}{fq_name}::{fn_name}({', '.join(new_arg_names)}); }}" - else: - if len(typed_args): - typed_args = f"self, {typed_args}" - else: - typed_args = "self" - - func_ref = f"[]({fq_name}& {typed_args}){{ return {'&' if returns_ref else ''}self.{node.spelling}({', '.join(new_arg_names)}); }}" - else: - func_ref = f"&{fq_name}::{fn_name}" - - if "operator" not in fn_name: - nb_fn_name = fn_name - # static method with non-static overloads that aren't also getters (getters are renamed already to break overlap) - # see mlir::ElementsAttr - if ( - len(counts[fn_name]) > 1 - and any( - props["is_static"] is False and not props["is_getter"] - for props in counts[fn_name] - ) - and node.is_static_method() - and not is_getter - ): - nb_fn_name += "_static" - if is_getter and nb_fn_name.startswith("get"): - nb_fn_name = nb_fn_name.replace("get", "") - nb_fn_name = f'"{inflection.underscore(nb_fn_name)}", ' - else: - if fn_name == "operator!=": - fn_name = "__ne__" - elif fn_name == "operator==": - fn_name = "__eq__" - elif fn_name == "operator-": - fn_name = "__neg__" - elif fn_name == "operator[]": - fn_name = "__getitem__" - elif fn_name == "operator<": - fn_name = "__lt__" - elif fn_name == "operator<=": - fn_name = "__le__" - elif fn_name == "operator>": - fn_name = "__gt__" - elif fn_name == "operator>=": - fn_name = "__ge__" - elif fn_name == "operator%": - fn_name = "__mod__" - elif fn_name == "operator*": - if len(arg_names): - fn_name = "__mul__" - else: - warning("operator* not supported") - return 2 - elif fn_name == "operator+" and len(arg_names): - fn_name = "__add__" - elif fn_name == "operator=": - warning("operator= not supported") - return 2 - elif fn_name == "operator->": - warning("operator-> not supported") - return 2 - elif fn_name == "operator!": - warning("operator! not supported") - return 2 - elif fn_name == "operator<<": - warning("operator<< not supported") - return 2 - nb_fn_name = f'"{fn_name}", ' - - # parsed_args = [parse_parameter(a) for a in node.get_arguments()] - if arg_names: - arg_names = list(map(inflection.underscore, arg_names)) - arg_names = ", ".join([f'"{a}"_a' for a in arg_names]) - arg_names = f", {arg_names}" - else: - arg_names = "" - - if is_getter: - if node.is_static_method(): - def_ = "def_static" - else: - def_ = "def_prop_ro" - else: - if node.is_static_method(): - def_ = "def_static" - else: - def_ = "def" - - if (returns_ptr or returns_ref) and not is_getter: - ref_internal = ", nb::rv_policy::reference_internal" - else: - ref_internal = "" - - print(f".{def_}({nb_fn_name}{func_ref}{arg_names}{ref_internal})", file=FILE) - return 2 # means continue visiting recursively - - -def emit_class(node: Cursor, all_classes_enums_structs, FILE): - if node.semantic_parent.kind in {CursorKind.CLASS_DECL, CursorKind.STRUCT_DECL}: - scope = get_nb_bind_class_name(node.semantic_parent) - else: - scope = "m" - - superclasses = [] - conf.lib.clang_visitChildren( - node, - clang.cindex.callbacks["cursor_visit"](get_public_supers), - superclasses, - ) - - cpp_class_name: str = get_canonical_type(node) - super_name = None - if len(superclasses) > 1: - warning(f"multiple base classes not supported {node.spelling}") - class_ = f"{cpp_class_name}" - elif len(superclasses) == 1: - super_name = get_canonical_type(superclasses[0].referenced) - if super_name in all_classes_enums_structs: - class_ = f"{cpp_class_name}, {super_name}" - elif super_name.startswith("mlir::Op<"): - # print( - # f'nb::class_<{super_name}, mlir::OpState>({scope}, "mlir_Op[{py_class_name}]");', - # file=FILE, - # ) - class_ = f"{cpp_class_name}, mlir::OpState" - elif super_name.startswith("mlir::detail::StorageUserBase<"): - super_name = super_name.split(",")[1] - class_ = f"{cpp_class_name}, {super_name}" - elif super_name.startswith("mlir::IntegerAttr"): - class_ = f"{cpp_class_name}, mlir::IntegerAttr" - elif super_name.startswith("mlir::Dialect"): - class_ = f"{cpp_class_name}, mlir::Dialect" - else: - warning(f"unknown super {super_name} for {cpp_class_name}") - class_ = f"{cpp_class_name}" - else: - class_ = f"{cpp_class_name}" - - auto_var = f"""auto {get_nb_bind_class_name(node)} = """ - print( - f'{auto_var}nb::class_<{class_}>({scope}, "{get_py_class_name(node)}")', - file=FILE, - ) - - methods = collect_methods_for_class(node) - conf.lib.clang_visitChildren( - node, - clang.cindex.callbacks["cursor_visit"](emit_class_members), - (get_canonical_type(node), methods, FILE), - ) - - if ( - super_name - and super_name.startswith("mlir::Dialect") - and cpp_class_name != "mlir::ExtensibleDialect" - ): - print( - f""".def_static("insert_into_registry", [](mlir::DialectRegistry ®istry) {{ registry.insert<{cpp_class_name}>(); }})""", - file=FILE, - ) - print( - f""".def_static("load_into_context", [](mlir::MLIRContext &context) {{ return context.getOrLoadDialect<{cpp_class_name}>(); }})""", - file=FILE, - ) - - print(";\n", file=FILE) - - -def get_nb_bind_class_name(node): - return ( - get_canonical_type(node) - .replace(" ", "") - .replace("::", "_") - .replace("<", "__") - .replace(">", "__") - .replace("*", "___") - .replace(",", "____") - ) - - -def get_py_class_name(node): - return ( - node.displayname.replace("<", "[") - .replace(">", "]") - .replace("::mlir::", "") - .replace("mlir::", "") - .replace(" ", "") - .replace("*", "") - ) - - -def emit_enum(node, FILE): - print( - f'nb::enum_<{get_canonical_type(node)}>(m, "{node.displayname}")', - file=FILE, - ) - conf.lib.clang_visitChildren( - node, clang.cindex.callbacks["cursor_visit"](emit_enum_values), FILE - ) - print(";\n", file=FILE) - - -def emit_file(tu, filename, prologue, epilogue, file_match_string): - seen = set() - all_classes_enums_structs = get_all_classes_enums_structs(tu, file_match_string) - FILE = open(filename, "w") - - print(prologue, file=FILE) - - for node in tu.cursor.walk_preorder(): - node: Cursor - if node.hash in seen: - continue - seen.add(node.hash) - if not node.location.file or file_match_string not in node.location.file.name: - continue - node_ty: Type = node.type - cpp_class_name: str = get_canonical_type(node) - - if ( - node.kind in {CursorKind.CLASS_DECL, CursorKind.STRUCT_DECL} - and node.is_definition() - and cpp_class_name.startswith("mlir") - and node.access_specifier - not in {AccessSpecifier.PRIVATE, AccessSpecifier.PROTECTED} - and get_canonical_type(node) not in class_blacklist - ): - emit_class(node, all_classes_enums_structs, FILE) - - if ( - node.kind == CursorKind.ENUM_DECL - and node.is_definition() - and node_ty.spelling.startswith("mlir") - and node.access_specifier - not in {AccessSpecifier.PRIVATE, AccessSpecifier.PROTECTED} - and get_canonical_type(node) not in class_blacklist - and "unnamed enum" not in get_canonical_type(node) - ): - emit_enum(node, FILE) - - print(epilogue, file=FILE) - - -def emit_ir_module(): - prologue = dedent( - f""" - #include "ir.h" - #include "mlir/IR/Action.h" - #include "mlir/IR/AffineExpr.h" - #include "mlir/IR/AffineExprVisitor.h" - #include "mlir/IR/AffineMap.h" - #include "mlir/IR/IntegerSet.h" - #include "mlir/IR/AsmState.h" - #include "mlir/IR/DialectResourceBlobManager.h" - #include "mlir/IR/Iterators.h" - #include "llvm/Support/ThreadPool.h" - namespace nb = nanobind; - using namespace nb::literals; - void populateIRModule(nanobind::module_ & m) {{ - using namespace mlir; - using namespace mlir::detail; - """ - ) - epilogue = "}" - # tu = parse_directory( - # Path("/Users/mlevental/dev_projects/eudsl/llvm-install/include/mlir/IR") - # ) - tu = parse_file( - "/Users/mlevental/dev_projects/eudsl/projects/eudsl-py/src/eudsl_ext.cpp" - ) - - emit_file(tu, "ir.cpp", prologue, epilogue, "include/mlir/IR") - - -def emit_arith_module(): - prologue = dedent( - f""" - #include "ir.h" - namespace nb = nanobind; - using namespace nb::literals; - void populateArithModule(nanobind::module_ & m) {{ - using namespace mlir; - using namespace mlir::detail; - using namespace mlir::arith; - """ - ) - epilogue = "}" - # tu = parse_directory( - # Path("/Users/mlevental/dev_projects/eudsl/llvm-install/include/mlir/IR") - # ) - tu = parse_file( - "/Users/mlevental/dev_projects/eudsl/projects/eudsl-py/src/eudsl_ext.cpp" - ) - emit_file(tu, "arith.cpp", prologue, epilogue, "include/mlir/Dialect/Arith/IR") - - -def emit_cf_module(): - prologue = dedent( - f""" - #include "ir.h" - #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h" - #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h" - namespace nb = nanobind; - using namespace nb::literals; - void populateControlFlowModule(nanobind::module_ & m) {{ - using namespace mlir; - using namespace mlir::detail; - using namespace mlir::cf; - """ - ) - epilogue = "}" - # tu = parse_directory( - # Path("/Users/mlevental/dev_projects/eudsl/llvm-install/include/mlir/IR") - # ) - tu = parse_file( - "/Users/mlevental/dev_projects/eudsl/projects/eudsl-py/src/eudsl_ext.cpp" - ) - emit_file(tu, "cf.cpp", prologue, epilogue, "include/mlir/Dialect/ControlFlow/IR") - - -def emit_scf_module(): - prologue = dedent( - f""" - #include "ir.h" - namespace nb = nanobind; - using namespace nb::literals; - void populateSCFModule(nanobind::module_ & m) {{ - using namespace mlir; - using namespace mlir::detail; - using namespace mlir::scf; - """ - ) - epilogue = "}" - # tu = parse_directory( - # Path("/Users/mlevental/dev_projects/eudsl/llvm-install/include/mlir/IR") - # ) - tu = parse_file( - "/Users/mlevental/dev_projects/eudsl/projects/eudsl-py/src/eudsl_ext.cpp" - ) - emit_file(tu, "scf.cpp", prologue, epilogue, "include/mlir/Dialect/SCF/IR") - - -def emit_affine_module(): - prologue = dedent( - f""" - #include "ir.h" - #include "mlir/IR/IntegerSet.h" - #include "mlir/Dialect/Affine/IR/AffineValueMap.h" - namespace nb = nanobind; - using namespace nb::literals; - void populateAffineModule(nanobind::module_ & m) {{ - using namespace mlir; - using namespace mlir::detail; - using namespace mlir::affine; - """ - ) - epilogue = "}" - # tu = parse_directory( - # Path("/Users/mlevental/dev_projects/eudsl/llvm-install/include/mlir/IR") - # ) - tu = parse_file( - "/Users/mlevental/dev_projects/eudsl/projects/eudsl-py/src/eudsl_ext.cpp" - ) - emit_file(tu, "affine.cpp", prologue, epilogue, "include/mlir/Dialect/Affine/IR") - - -# emit_ir_module() -# emit_arith_module() -# emit_cf_module() -# emit_scf_module() -emit_affine_module() diff --git a/projects/eudsl-py/src/scf.cpp b/projects/eudsl-py/src/scf.cpp deleted file mode 100644 index 7d990e1f..00000000 --- a/projects/eudsl-py/src/scf.cpp +++ /dev/null @@ -1,704 +0,0 @@ - -#include "ir.h" -#include "llvm/Support/ThreadPool.h" -namespace nb = nanobind; -using namespace nb::literals; -void populateSCFModule(nanobind::module_ & m) { -using namespace mlir; -using namespace mlir::detail; -using namespace mlir::scf; - -auto mlir_detail_DeviceMappingAttrInterfaceInterfaceTraits = nb::class_(m, "DeviceMappingAttrInterfaceInterfaceTraits") -; - -auto mlir_detail_DeviceMappingAttrInterfaceInterfaceTraits_Concept = nb::class_(mlir_detail_DeviceMappingAttrInterfaceInterfaceTraits, "Concept") -; - -auto mlir_DeviceMappingAttrInterface = nb::class_(m, "DeviceMappingAttrInterface") -.def_prop_ro("mapping_id", &mlir::DeviceMappingAttrInterface::getMappingId) -.def("is_linear_mapping", &mlir::DeviceMappingAttrInterface::isLinearMapping) -.def_prop_ro("relative_index", &mlir::DeviceMappingAttrInterface::getRelativeIndex) -; - -auto mlir_scf_SCFDialect = nb::class_(m, "SCFDialect") -.def_static("dialect_namespace", &mlir::scf::SCFDialect::getDialectNamespace) -.def_static("insert_into_registry", [](mlir::DialectRegistry ®istry) { registry.insert(); }) -.def_static("load_into_context", [](mlir::MLIRContext &context) { return context.getOrLoadDialect(); }) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_SCFDialect__ = nb::class_>(m, "TypeIDResolver[scf::SCFDialect]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::SCFDialect>::resolveTypeID) -; - -auto mlir_scf_detail_ConditionOpGenericAdaptorBase = nb::class_(m, "ConditionOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ConditionOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::ConditionOpGenericAdaptorBase::getAttributes) -; - -auto mlir_scf_ConditionOpAdaptor = nb::class_(m, "ConditionOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ConditionOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ConditionOp = nb::class_(m, "ConditionOp") -.def_static("attribute_names", &mlir::scf::ConditionOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::ConditionOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ConditionOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ConditionOp::getODSOperands, "index"_a) -.def_prop_ro("condition", &mlir::scf::ConditionOp::getCondition) -.def_prop_ro("args", &mlir::scf::ConditionOp::getArgs) -.def_prop_ro("condition_mutable", &mlir::scf::ConditionOp::getConditionMutable) -.def_prop_ro("args_mutable", &mlir::scf::ConditionOp::getArgsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::ConditionOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ConditionOp::getODSResults, "index"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value condition, mlir::ValueRange args){ return mlir::scf::ConditionOp::build(odsBuilder, odsState, condition, args); }, "ods_builder"_a, "ods_state"_a, "condition"_a, "args"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value condition, mlir::ValueRange args){ return mlir::scf::ConditionOp::build(odsBuilder, odsState, resultTypes, condition, args); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "condition"_a, "args"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::scf::ConditionOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::scf::ConditionOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ConditionOp::verifyInvariants) -.def("get_mutable_successor_operands", &mlir::scf::ConditionOp::getMutableSuccessorOperands, "point"_a) -.def("get_successor_regions", &mlir::scf::ConditionOp::getSuccessorRegions, "operands"_a, "regions"_a) -.def_static("parse", &mlir::scf::ConditionOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::scf::ConditionOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ConditionOp__ = nb::class_>(m, "TypeIDResolver[scf::ConditionOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ConditionOp>::resolveTypeID) -; - -auto mlir_scf_detail_ExecuteRegionOpGenericAdaptorBase = nb::class_(m, "ExecuteRegionOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ExecuteRegionOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::ExecuteRegionOpGenericAdaptorBase::getAttributes) -.def_prop_ro("region", &mlir::scf::detail::ExecuteRegionOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::scf::detail::ExecuteRegionOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_ExecuteRegionOpAdaptor = nb::class_(m, "ExecuteRegionOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ExecuteRegionOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ExecuteRegionOp = nb::class_(m, "ExecuteRegionOp") -.def_static("attribute_names", &mlir::scf::ExecuteRegionOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::ExecuteRegionOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ExecuteRegionOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ExecuteRegionOp::getODSOperands, "index"_a) -.def("get_ods_result_index_and_length", &mlir::scf::ExecuteRegionOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ExecuteRegionOp::getODSResults, "index"_a) -.def_prop_ro("region", &mlir::scf::ExecuteRegionOp::getRegion) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultType0){ return mlir::scf::ExecuteRegionOp::build(odsBuilder, odsState, resultType0); }, "ods_builder"_a, "ods_state"_a, "result_type0"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::scf::ExecuteRegionOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::scf::ExecuteRegionOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::ExecuteRegionOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ExecuteRegionOp::verifyInvariants) -.def("verify", &mlir::scf::ExecuteRegionOp::verify) -.def_static("get_canonicalization_patterns", &mlir::scf::ExecuteRegionOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_successor_regions", &mlir::scf::ExecuteRegionOp::getSuccessorRegions, "point"_a, "regions"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ExecuteRegionOp__ = nb::class_>(m, "TypeIDResolver[scf::ExecuteRegionOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ExecuteRegionOp>::resolveTypeID) -; - -auto mlir_scf_detail_ForOpGenericAdaptorBase = nb::class_(m, "ForOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ForOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::ForOpGenericAdaptorBase::getAttributes) -.def_prop_ro("region", &mlir::scf::detail::ForOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::scf::detail::ForOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_ForOpAdaptor = nb::class_(m, "ForOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ForOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ForOp = nb::class_(m, "ForOp") -.def_static("attribute_names", &mlir::scf::ForOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::ForOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ForOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ForOp::getODSOperands, "index"_a) -.def_prop_ro("lower_bound", &mlir::scf::ForOp::getLowerBound) -.def_prop_ro("upper_bound", &mlir::scf::ForOp::getUpperBound) -.def_prop_ro("step", &mlir::scf::ForOp::getStep) -.def_prop_ro("init_args", &mlir::scf::ForOp::getInitArgs) -.def_prop_ro("lower_bound_mutable", &mlir::scf::ForOp::getLowerBoundMutable) -.def_prop_ro("upper_bound_mutable", &mlir::scf::ForOp::getUpperBoundMutable) -.def_prop_ro("step_mutable", &mlir::scf::ForOp::getStepMutable) -.def_prop_ro("init_args_mutable", &mlir::scf::ForOp::getInitArgsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::ForOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ForOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::scf::ForOp::getResults) -.def_prop_ro("region", &mlir::scf::ForOp::getRegion) -.def_static("build", &mlir::scf::ForOp::build, "ods_builder"_a, "ods_state"_a, "lower_bound"_a, "upper_bound"_a, "step"_a, "init_args"_a, "ods_arg4"_a) -.def_static("parse", &mlir::scf::ForOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::ForOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ForOp::verifyInvariants) -.def("verify", &mlir::scf::ForOp::verify) -.def("verify_regions", &mlir::scf::ForOp::verifyRegions) -.def_static("get_canonicalization_patterns", &mlir::scf::ForOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def_prop_ro("loop_regions", &mlir::scf::ForOp::getLoopRegions) -.def("promote_if_single_iteration", &mlir::scf::ForOp::promoteIfSingleIteration, "rewriter"_a) -.def_prop_ro("loop_induction_vars", &mlir::scf::ForOp::getLoopInductionVars) -.def_prop_ro("loop_lower_bounds", &mlir::scf::ForOp::getLoopLowerBounds) -.def_prop_ro("loop_steps", &mlir::scf::ForOp::getLoopSteps) -.def_prop_ro("loop_upper_bounds", &mlir::scf::ForOp::getLoopUpperBounds) -.def_prop_ro("inits_mutable", &mlir::scf::ForOp::getInitsMutable) -.def_prop_ro("region_iter_args", &mlir::scf::ForOp::getRegionIterArgs) -.def_prop_ro("yielded_values_mutable", &mlir::scf::ForOp::getYieldedValuesMutable) -.def_prop_ro("loop_results", &mlir::scf::ForOp::getLoopResults) -.def("replace_with_additional_yields", &mlir::scf::ForOp::replaceWithAdditionalYields, "rewriter"_a, "new_init_operands"_a, "replace_init_operand_uses_in_loop"_a, "new_yield_values_fn"_a) -.def("get_entry_successor_operands", &mlir::scf::ForOp::getEntrySuccessorOperands, "point"_a) -.def("get_successor_regions", &mlir::scf::ForOp::getSuccessorRegions, "point"_a, "regions"_a) -.def_prop_ro("induction_var", &mlir::scf::ForOp::getInductionVar) -.def("get_region_iter_arg", &mlir::scf::ForOp::getRegionIterArg, "index"_a) -.def("set_lower_bound", &mlir::scf::ForOp::setLowerBound, "bound"_a) -.def("set_upper_bound", &mlir::scf::ForOp::setUpperBound, "bound"_a) -.def("set_step", &mlir::scf::ForOp::setStep, "step"_a) -.def_prop_ro("num_induction_vars", &mlir::scf::ForOp::getNumInductionVars) -.def_prop_ro("num_region_iter_args", &mlir::scf::ForOp::getNumRegionIterArgs) -.def_prop_ro("num_control_operands", &mlir::scf::ForOp::getNumControlOperands) -.def_prop_ro("constant_step", &mlir::scf::ForOp::getConstantStep) -.def_prop_ro("speculatability", &mlir::scf::ForOp::getSpeculatability) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ForOp__ = nb::class_>(m, "TypeIDResolver[scf::ForOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ForOp>::resolveTypeID) -; - -auto mlir_scf_detail_ForallOpGenericAdaptorBase = nb::class_(m, "ForallOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ForallOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::scf::detail::ForallOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::scf::detail::ForallOpGenericAdaptorBase::getAttributes) -.def_prop_ro("static_lower_bound_attr", &mlir::scf::detail::ForallOpGenericAdaptorBase::getStaticLowerBoundAttr) -.def_prop_ro("static_lower_bound", &mlir::scf::detail::ForallOpGenericAdaptorBase::getStaticLowerBound) -.def_prop_ro("static_upper_bound_attr", &mlir::scf::detail::ForallOpGenericAdaptorBase::getStaticUpperBoundAttr) -.def_prop_ro("static_upper_bound", &mlir::scf::detail::ForallOpGenericAdaptorBase::getStaticUpperBound) -.def_prop_ro("static_step_attr", &mlir::scf::detail::ForallOpGenericAdaptorBase::getStaticStepAttr) -.def_prop_ro("static_step", &mlir::scf::detail::ForallOpGenericAdaptorBase::getStaticStep) -.def_prop_ro("mapping_attr", &mlir::scf::detail::ForallOpGenericAdaptorBase::getMappingAttr) -.def_prop_ro("mapping", &mlir::scf::detail::ForallOpGenericAdaptorBase::getMapping) -.def_prop_ro("region", &mlir::scf::detail::ForallOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::scf::detail::ForallOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_detail_ForallOpGenericAdaptorBase_Properties = nb::class_(mlir_scf_detail_ForallOpGenericAdaptorBase, "Properties") -.def_prop_ro("mapping", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::getMapping) -.def("set_mapping", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::setMapping, "prop_value"_a) -.def_prop_ro("static_lower_bound", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::getStaticLowerBound) -.def("set_static_lower_bound", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::setStaticLowerBound, "prop_value"_a) -.def_prop_ro("static_step", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::getStaticStep) -.def("set_static_step", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::setStaticStep, "prop_value"_a) -.def_prop_ro("static_upper_bound", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::getStaticUpperBound) -.def("set_static_upper_bound", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::setStaticUpperBound, "prop_value"_a) -.def_prop_ro("operand_segment_sizes", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::getOperandSegmentSizes) -.def("set_operand_segment_sizes", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::setOperandSegmentSizes, "prop_value"_a) -.def("__eq__", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::scf::detail::ForallOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_scf_ForallOpAdaptor = nb::class_(m, "ForallOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ForallOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ForallOp = nb::class_(m, "ForallOp") -.def_static("attribute_names", &mlir::scf::ForallOp::getAttributeNames) -.def_prop_ro("mapping_attr_name", [](mlir::scf::ForallOp& self){ return self.getMappingAttrName(); }) -.def_static("get_mapping_attr_name", [](mlir::OperationName name){ return mlir::scf::ForallOp::getMappingAttrName(name); }, "name"_a) -.def_prop_ro("static_lower_bound_attr_name", [](mlir::scf::ForallOp& self){ return self.getStaticLowerBoundAttrName(); }) -.def_static("get_static_lower_bound_attr_name", [](mlir::OperationName name){ return mlir::scf::ForallOp::getStaticLowerBoundAttrName(name); }, "name"_a) -.def_prop_ro("static_step_attr_name", [](mlir::scf::ForallOp& self){ return self.getStaticStepAttrName(); }) -.def_static("get_static_step_attr_name", [](mlir::OperationName name){ return mlir::scf::ForallOp::getStaticStepAttrName(name); }, "name"_a) -.def_prop_ro("static_upper_bound_attr_name", [](mlir::scf::ForallOp& self){ return self.getStaticUpperBoundAttrName(); }) -.def_static("get_static_upper_bound_attr_name", [](mlir::OperationName name){ return mlir::scf::ForallOp::getStaticUpperBoundAttrName(name); }, "name"_a) -.def_prop_ro("operand_segment_sizes_attr_name", [](mlir::scf::ForallOp& self){ return self.getOperandSegmentSizesAttrName(); }) -.def_static("get_operand_segment_sizes_attr_name", [](mlir::OperationName name){ return mlir::scf::ForallOp::getOperandSegmentSizesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::scf::ForallOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ForallOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ForallOp::getODSOperands, "index"_a) -.def_prop_ro("dynamic_lower_bound", &mlir::scf::ForallOp::getDynamicLowerBound) -.def_prop_ro("dynamic_upper_bound", &mlir::scf::ForallOp::getDynamicUpperBound) -.def_prop_ro("dynamic_step", &mlir::scf::ForallOp::getDynamicStep) -.def_prop_ro("outputs", &mlir::scf::ForallOp::getOutputs) -.def_prop_ro("dynamic_lower_bound_mutable", &mlir::scf::ForallOp::getDynamicLowerBoundMutable) -.def_prop_ro("dynamic_upper_bound_mutable", &mlir::scf::ForallOp::getDynamicUpperBoundMutable) -.def_prop_ro("dynamic_step_mutable", &mlir::scf::ForallOp::getDynamicStepMutable) -.def_prop_ro("outputs_mutable", &mlir::scf::ForallOp::getOutputsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::ForallOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ForallOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::scf::ForallOp::getResults) -.def_prop_ro("region", &mlir::scf::ForallOp::getRegion) -.def_static("set_properties_from_attr", &mlir::scf::ForallOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::scf::ForallOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::scf::ForallOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::scf::ForallOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::scf::ForallOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::scf::ForallOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::scf::ForallOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::scf::ForallOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::scf::ForallOp::writeProperties, "writer"_a) -.def_prop_ro("static_lower_bound_attr", &mlir::scf::ForallOp::getStaticLowerBoundAttr) -.def_prop_ro("static_lower_bound", &mlir::scf::ForallOp::getStaticLowerBound) -.def_prop_ro("static_upper_bound_attr", &mlir::scf::ForallOp::getStaticUpperBoundAttr) -.def_prop_ro("static_upper_bound", &mlir::scf::ForallOp::getStaticUpperBound) -.def_prop_ro("static_step_attr", &mlir::scf::ForallOp::getStaticStepAttr) -.def_prop_ro("static_step", &mlir::scf::ForallOp::getStaticStep) -.def_prop_ro("mapping_attr", &mlir::scf::ForallOp::getMappingAttr) -.def_prop_ro("mapping", &mlir::scf::ForallOp::getMapping) -.def("set_static_lower_bound_attr", &mlir::scf::ForallOp::setStaticLowerBoundAttr, "attr"_a) -.def("set_static_lower_bound", &mlir::scf::ForallOp::setStaticLowerBound, "attr_value"_a) -.def("set_static_upper_bound_attr", &mlir::scf::ForallOp::setStaticUpperBoundAttr, "attr"_a) -.def("set_static_upper_bound", &mlir::scf::ForallOp::setStaticUpperBound, "attr_value"_a) -.def("set_static_step_attr", &mlir::scf::ForallOp::setStaticStepAttr, "attr"_a) -.def("set_static_step", &mlir::scf::ForallOp::setStaticStep, "attr_value"_a) -.def("set_mapping_attr", &mlir::scf::ForallOp::setMappingAttr, "attr"_a) -.def("remove_mapping_attr", &mlir::scf::ForallOp::removeMappingAttr) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, llvm::ArrayRef lbs, llvm::ArrayRef ubs, llvm::ArrayRef steps, mlir::ValueRange outputs, std::optional mapping, llvm::function_ref bodyBuilderFn){ return mlir::scf::ForallOp::build(odsBuilder, odsState, lbs, ubs, steps, outputs, mapping, bodyBuilderFn); }, "ods_builder"_a, "ods_state"_a, "lbs"_a, "ubs"_a, "steps"_a, "outputs"_a, "mapping"_a, "body_builder_fn"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, llvm::ArrayRef ubs, mlir::ValueRange outputs, std::optional mapping, llvm::function_ref bodyBuilderFn){ return mlir::scf::ForallOp::build(odsBuilder, odsState, ubs, outputs, mapping, bodyBuilderFn); }, "ods_builder"_a, "ods_state"_a, "ubs"_a, "outputs"_a, "mapping"_a, "body_builder_fn"_a) -.def_static("parse", &mlir::scf::ForallOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::ForallOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ForallOp::verifyInvariants) -.def("verify", &mlir::scf::ForallOp::verify) -.def_static("get_canonicalization_patterns", &mlir::scf::ForallOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def_prop_ro("loop_regions", &mlir::scf::ForallOp::getLoopRegions) -.def("promote_if_single_iteration", &mlir::scf::ForallOp::promoteIfSingleIteration, "rewriter"_a) -.def_prop_ro("loop_induction_vars", &mlir::scf::ForallOp::getLoopInductionVars) -.def_prop_ro("loop_lower_bounds", &mlir::scf::ForallOp::getLoopLowerBounds) -.def_prop_ro("loop_steps", &mlir::scf::ForallOp::getLoopSteps) -.def_prop_ro("loop_upper_bounds", &mlir::scf::ForallOp::getLoopUpperBounds) -.def_prop_ro("inits_mutable", &mlir::scf::ForallOp::getInitsMutable) -.def_prop_ro("region_iter_args", &mlir::scf::ForallOp::getRegionIterArgs) -.def("get_successor_regions", &mlir::scf::ForallOp::getSuccessorRegions, "point"_a, "regions"_a) -.def_prop_ro("induction_vars", &mlir::scf::ForallOp::getInductionVars) -.def_prop_ro("mixed_lower_bound", &mlir::scf::ForallOp::getMixedLowerBound) -.def_prop_ro("mixed_upper_bound", &mlir::scf::ForallOp::getMixedUpperBound) -.def_prop_ro("mixed_step", &mlir::scf::ForallOp::getMixedStep) -.def("get_lower_bound", &mlir::scf::ForallOp::getLowerBound, "b"_a) -.def("get_upper_bound", &mlir::scf::ForallOp::getUpperBound, "b"_a) -.def("get_step", &mlir::scf::ForallOp::getStep, "b"_a) -.def_prop_ro("rank", &mlir::scf::ForallOp::getRank) -.def_prop_ro("num_control_operands", &mlir::scf::ForallOp::getNumControlOperands) -.def_prop_ro("num_dynamic_control_operands", &mlir::scf::ForallOp::getNumDynamicControlOperands) -.def("get_tied_op_result", &mlir::scf::ForallOp::getTiedOpResult, "op_operand"_a) -.def("get_tied_op_operand", [](mlir::scf::ForallOp& self, mlir::BlockArgument bbArg){ return self.getTiedOpOperand(bbArg); }, "bb_arg"_a, nb::rv_policy::reference_internal) -.def("get_tied_op_operand", [](mlir::scf::ForallOp& self, mlir::OpResult opResult){ return self.getTiedOpOperand(opResult); }, "op_result"_a, nb::rv_policy::reference_internal) -.def("get_tied_block_argument", &mlir::scf::ForallOp::getTiedBlockArgument, "op_operand"_a) -.def("get_induction_var", &mlir::scf::ForallOp::getInductionVar, "idx"_a) -.def_prop_ro("region_out_args", &mlir::scf::ForallOp::getRegionOutArgs) -.def("is_normalized", &mlir::scf::ForallOp::isNormalized) -.def_static("ensure_terminator", &mlir::scf::ForallOp::ensureTerminator, "region"_a, "builder"_a, "loc"_a) -.def_prop_ro("terminator", &mlir::scf::ForallOp::getTerminator) -.def_prop_ro("dps_inits_mutable", &mlir::scf::ForallOp::getDpsInitsMutable) -.def("get_combining_ops", &mlir::scf::ForallOp::getCombiningOps, "bb_arg"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ForallOp__ = nb::class_>(m, "TypeIDResolver[scf::ForallOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ForallOp>::resolveTypeID) -; - -auto mlir_scf_detail_IfOpGenericAdaptorBase = nb::class_(m, "IfOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::IfOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::IfOpGenericAdaptorBase::getAttributes) -.def_prop_ro("then_region", &mlir::scf::detail::IfOpGenericAdaptorBase::getThenRegion) -.def_prop_ro("else_region", &mlir::scf::detail::IfOpGenericAdaptorBase::getElseRegion) -.def_prop_ro("regions", &mlir::scf::detail::IfOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_IfOpAdaptor = nb::class_(m, "IfOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::IfOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_IfOp = nb::class_(m, "IfOp") -.def_static("attribute_names", &mlir::scf::IfOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::IfOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::IfOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::IfOp::getODSOperands, "index"_a) -.def_prop_ro("condition", &mlir::scf::IfOp::getCondition) -.def_prop_ro("condition_mutable", &mlir::scf::IfOp::getConditionMutable) -.def("get_ods_result_index_and_length", &mlir::scf::IfOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::IfOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::scf::IfOp::getResults) -.def_prop_ro("then_region", &mlir::scf::IfOp::getThenRegion) -.def_prop_ro("else_region", &mlir::scf::IfOp::getElseRegion) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value cond){ return mlir::scf::IfOp::build(odsBuilder, odsState, resultTypes, cond); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "cond"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value cond, bool addThenBlock, bool addElseBlock){ return mlir::scf::IfOp::build(odsBuilder, odsState, resultTypes, cond, addThenBlock, addElseBlock); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "cond"_a, "add_then_block"_a, "add_else_block"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value cond, bool withElseRegion){ return mlir::scf::IfOp::build(odsBuilder, odsState, cond, withElseRegion); }, "ods_builder"_a, "ods_state"_a, "cond"_a, "with_else_region"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value cond, bool withElseRegion){ return mlir::scf::IfOp::build(odsBuilder, odsState, resultTypes, cond, withElseRegion); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "cond"_a, "with_else_region"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value cond, llvm::function_ref thenBuilder, llvm::function_ref elseBuilder){ return mlir::scf::IfOp::build(odsBuilder, odsState, cond, thenBuilder, elseBuilder); }, "ods_builder"_a, "ods_state"_a, "cond"_a, "then_builder"_a, "else_builder"_a) -.def_static("parse", &mlir::scf::IfOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::IfOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::IfOp::verifyInvariants) -.def("verify", &mlir::scf::IfOp::verify) -.def_static("get_canonicalization_patterns", &mlir::scf::IfOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("fold", &mlir::scf::IfOp::fold, "adaptor"_a, "results"_a) -.def("get_entry_successor_regions", &mlir::scf::IfOp::getEntrySuccessorRegions, "operands"_a, "regions"_a) -.def("get_successor_regions", &mlir::scf::IfOp::getSuccessorRegions, "point"_a, "regions"_a) -.def("get_region_invocation_bounds", &mlir::scf::IfOp::getRegionInvocationBounds, "operands"_a, "invocation_bounds"_a) -.def_static("infer_return_types", [](mlir::MLIRContext * context, std::optional location, mlir::ValueRange operands, mlir::DictionaryAttr attributes, mlir::OpaqueProperties properties, mlir::RegionRange regions, llvm::SmallVectorImpl & inferredReturnTypes){ return mlir::scf::IfOp::inferReturnTypes(context, location, operands, attributes, properties, regions, inferredReturnTypes); }, "context"_a, "location"_a, "operands"_a, "attributes"_a, "properties"_a, "regions"_a, "inferred_return_types"_a) -.def_static("infer_return_types", [](mlir::MLIRContext * context, std::optional location, mlir::scf::IfOp::Adaptor adaptor, llvm::SmallVectorImpl & inferredReturnTypes){ return mlir::scf::IfOp::inferReturnTypes(context, location, adaptor, inferredReturnTypes); }, "context"_a, "location"_a, "adaptor"_a, "inferred_return_types"_a) -.def("get_then_body_builder", &mlir::scf::IfOp::getThenBodyBuilder, "listener"_a) -.def("get_else_body_builder", &mlir::scf::IfOp::getElseBodyBuilder, "listener"_a) -.def("then_block", &mlir::scf::IfOp::thenBlock, nb::rv_policy::reference_internal) -.def("then_yield", &mlir::scf::IfOp::thenYield) -.def("else_block", &mlir::scf::IfOp::elseBlock, nb::rv_policy::reference_internal) -.def("else_yield", &mlir::scf::IfOp::elseYield) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_IfOp__ = nb::class_>(m, "TypeIDResolver[scf::IfOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::IfOp>::resolveTypeID) -; - -auto mlir_scf_detail_InParallelOpGenericAdaptorBase = nb::class_(m, "InParallelOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::InParallelOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::InParallelOpGenericAdaptorBase::getAttributes) -.def_prop_ro("region", &mlir::scf::detail::InParallelOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::scf::detail::InParallelOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_InParallelOpAdaptor = nb::class_(m, "InParallelOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::InParallelOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_InParallelOp = nb::class_(m, "InParallelOp") -.def_static("attribute_names", &mlir::scf::InParallelOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::InParallelOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::InParallelOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::InParallelOp::getODSOperands, "index"_a) -.def("get_ods_result_index_and_length", &mlir::scf::InParallelOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::InParallelOp::getODSResults, "index"_a) -.def_prop_ro("region", &mlir::scf::InParallelOp::getRegion) -.def_static("build", &mlir::scf::InParallelOp::build, "ods_builder"_a, "ods_state"_a) -.def_static("parse", &mlir::scf::InParallelOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::InParallelOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::InParallelOp::verifyInvariants) -.def("verify", &mlir::scf::InParallelOp::verify) -.def("get_effects", &mlir::scf::InParallelOp::getEffects, "effects"_a) -.def_prop_ro("dests", &mlir::scf::InParallelOp::getDests) -.def_prop_ro("yielding_ops", &mlir::scf::InParallelOp::getYieldingOps) -.def("get_parent_result", &mlir::scf::InParallelOp::getParentResult, "idx"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_InParallelOp__ = nb::class_>(m, "TypeIDResolver[scf::InParallelOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::InParallelOp>::resolveTypeID) -; - -auto mlir_scf_detail_IndexSwitchOpGenericAdaptorBase = nb::class_(m, "IndexSwitchOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getAttributes) -.def_prop_ro("cases_attr", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getCasesAttr) -.def_prop_ro("cases", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getCases) -.def_prop_ro("default_region", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getDefaultRegion) -.def_prop_ro("case_regions", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getCaseRegions) -.def_prop_ro("regions", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_detail_IndexSwitchOpGenericAdaptorBase_Properties = nb::class_(mlir_scf_detail_IndexSwitchOpGenericAdaptorBase, "Properties") -.def_prop_ro("cases", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::Properties::getCases) -.def("set_cases", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::Properties::setCases, "prop_value"_a) -.def("__eq__", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::scf::detail::IndexSwitchOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_scf_IndexSwitchOpAdaptor = nb::class_(m, "IndexSwitchOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::IndexSwitchOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_IndexSwitchOp = nb::class_(m, "IndexSwitchOp") -.def_static("attribute_names", &mlir::scf::IndexSwitchOp::getAttributeNames) -.def_prop_ro("cases_attr_name", [](mlir::scf::IndexSwitchOp& self){ return self.getCasesAttrName(); }) -.def_static("get_cases_attr_name", [](mlir::OperationName name){ return mlir::scf::IndexSwitchOp::getCasesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::scf::IndexSwitchOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::IndexSwitchOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::IndexSwitchOp::getODSOperands, "index"_a) -.def_prop_ro("arg", &mlir::scf::IndexSwitchOp::getArg) -.def_prop_ro("arg_mutable", &mlir::scf::IndexSwitchOp::getArgMutable) -.def("get_ods_result_index_and_length", &mlir::scf::IndexSwitchOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::IndexSwitchOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::scf::IndexSwitchOp::getResults) -.def_prop_ro("default_region", &mlir::scf::IndexSwitchOp::getDefaultRegion) -.def_prop_ro("case_regions", &mlir::scf::IndexSwitchOp::getCaseRegions) -.def_static("set_properties_from_attr", &mlir::scf::IndexSwitchOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::scf::IndexSwitchOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::scf::IndexSwitchOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::scf::IndexSwitchOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::scf::IndexSwitchOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::scf::IndexSwitchOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::scf::IndexSwitchOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::scf::IndexSwitchOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::scf::IndexSwitchOp::writeProperties, "writer"_a) -.def_prop_ro("cases_attr", &mlir::scf::IndexSwitchOp::getCasesAttr) -.def_prop_ro("cases", &mlir::scf::IndexSwitchOp::getCases) -.def("set_cases_attr", &mlir::scf::IndexSwitchOp::setCasesAttr, "attr"_a) -.def("set_cases", &mlir::scf::IndexSwitchOp::setCases, "attr_value"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange results, mlir::Value arg, mlir::detail::DenseArrayAttrImpl cases, unsigned int caseRegionsCount){ return mlir::scf::IndexSwitchOp::build(odsBuilder, odsState, results, arg, cases, caseRegionsCount); }, "ods_builder"_a, "ods_state"_a, "results"_a, "arg"_a, "cases"_a, "case_regions_count"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange results, mlir::Value arg, ::llvm::ArrayRef cases, unsigned int caseRegionsCount){ return mlir::scf::IndexSwitchOp::build(odsBuilder, odsState, results, arg, cases, caseRegionsCount); }, "ods_builder"_a, "ods_state"_a, "results"_a, "arg"_a, "cases"_a, "case_regions_count"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes, unsigned int numRegions){ return mlir::scf::IndexSwitchOp::build(_, odsState, resultTypes, operands, attributes, numRegions); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a, "num_regions"_a) -.def("verify_invariants_impl", &mlir::scf::IndexSwitchOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::IndexSwitchOp::verifyInvariants) -.def("verify", &mlir::scf::IndexSwitchOp::verify) -.def_static("get_canonicalization_patterns", &mlir::scf::IndexSwitchOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_entry_successor_regions", &mlir::scf::IndexSwitchOp::getEntrySuccessorRegions, "operands"_a, "regions"_a) -.def("get_successor_regions", &mlir::scf::IndexSwitchOp::getSuccessorRegions, "point"_a, "regions"_a) -.def("get_region_invocation_bounds", &mlir::scf::IndexSwitchOp::getRegionInvocationBounds, "operands"_a, "invocation_bounds"_a) -.def_static("parse", &mlir::scf::IndexSwitchOp::parse, "parser"_a, "result"_a) -.def_prop_ro("num_cases", &mlir::scf::IndexSwitchOp::getNumCases) -.def_prop_ro("default_block", &mlir::scf::IndexSwitchOp::getDefaultBlock) -.def("get_case_block", &mlir::scf::IndexSwitchOp::getCaseBlock, "idx"_a, nb::rv_policy::reference_internal) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_IndexSwitchOp__ = nb::class_>(m, "TypeIDResolver[scf::IndexSwitchOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::IndexSwitchOp>::resolveTypeID) -; - -auto mlir_scf_detail_ParallelOpGenericAdaptorBase = nb::class_(m, "ParallelOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ParallelOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("properties", &mlir::scf::detail::ParallelOpGenericAdaptorBase::getProperties) -.def_prop_ro("attributes", &mlir::scf::detail::ParallelOpGenericAdaptorBase::getAttributes) -.def_prop_ro("region", &mlir::scf::detail::ParallelOpGenericAdaptorBase::getRegion) -.def_prop_ro("regions", &mlir::scf::detail::ParallelOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_detail_ParallelOpGenericAdaptorBase_Properties = nb::class_(mlir_scf_detail_ParallelOpGenericAdaptorBase, "Properties") -.def_prop_ro("operand_segment_sizes", &mlir::scf::detail::ParallelOpGenericAdaptorBase::Properties::getOperandSegmentSizes) -.def("set_operand_segment_sizes", &mlir::scf::detail::ParallelOpGenericAdaptorBase::Properties::setOperandSegmentSizes, "prop_value"_a) -.def("__eq__", &mlir::scf::detail::ParallelOpGenericAdaptorBase::Properties::operator==, "rhs"_a) -.def("__ne__", &mlir::scf::detail::ParallelOpGenericAdaptorBase::Properties::operator!=, "rhs"_a) -; - -auto mlir_scf_ParallelOpAdaptor = nb::class_(m, "ParallelOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ParallelOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ParallelOp = nb::class_(m, "ParallelOp") -.def_static("attribute_names", &mlir::scf::ParallelOp::getAttributeNames) -.def_prop_ro("operand_segment_sizes_attr_name", [](mlir::scf::ParallelOp& self){ return self.getOperandSegmentSizesAttrName(); }) -.def_static("get_operand_segment_sizes_attr_name", [](mlir::OperationName name){ return mlir::scf::ParallelOp::getOperandSegmentSizesAttrName(name); }, "name"_a) -.def_static("operation_name", &mlir::scf::ParallelOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ParallelOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ParallelOp::getODSOperands, "index"_a) -.def_prop_ro("lower_bound", &mlir::scf::ParallelOp::getLowerBound) -.def_prop_ro("upper_bound", &mlir::scf::ParallelOp::getUpperBound) -.def_prop_ro("step", &mlir::scf::ParallelOp::getStep) -.def_prop_ro("init_vals", &mlir::scf::ParallelOp::getInitVals) -.def_prop_ro("lower_bound_mutable", &mlir::scf::ParallelOp::getLowerBoundMutable) -.def_prop_ro("upper_bound_mutable", &mlir::scf::ParallelOp::getUpperBoundMutable) -.def_prop_ro("step_mutable", &mlir::scf::ParallelOp::getStepMutable) -.def_prop_ro("init_vals_mutable", &mlir::scf::ParallelOp::getInitValsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::ParallelOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ParallelOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::scf::ParallelOp::getResults) -.def_prop_ro("region", &mlir::scf::ParallelOp::getRegion) -.def_static("set_properties_from_attr", &mlir::scf::ParallelOp::setPropertiesFromAttr, "prop"_a, "attr"_a, "emit_error"_a) -.def_static("get_properties_as_attr", &mlir::scf::ParallelOp::getPropertiesAsAttr, "ctx"_a, "prop"_a) -.def_static("compute_properties_hash", &mlir::scf::ParallelOp::computePropertiesHash, "prop"_a) -.def_static("get_inherent_attr", &mlir::scf::ParallelOp::getInherentAttr, "ctx"_a, "prop"_a, "name"_a) -.def_static("set_inherent_attr", &mlir::scf::ParallelOp::setInherentAttr, "prop"_a, "name"_a, "value"_a) -.def_static("populate_inherent_attrs", &mlir::scf::ParallelOp::populateInherentAttrs, "ctx"_a, "prop"_a, "attrs"_a) -.def_static("verify_inherent_attrs", &mlir::scf::ParallelOp::verifyInherentAttrs, "op_name"_a, "attrs"_a, "emit_error"_a) -.def_static("read_properties", &mlir::scf::ParallelOp::readProperties, "reader"_a, "state"_a) -.def("write_properties", &mlir::scf::ParallelOp::writeProperties, "writer"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange lowerBounds, mlir::ValueRange upperBounds, mlir::ValueRange steps, mlir::ValueRange initVals, llvm::function_ref bodyBuilderFn){ return mlir::scf::ParallelOp::build(odsBuilder, odsState, lowerBounds, upperBounds, steps, initVals, bodyBuilderFn); }, "ods_builder"_a, "ods_state"_a, "lower_bounds"_a, "upper_bounds"_a, "steps"_a, "init_vals"_a, "body_builder_fn"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange lowerBounds, mlir::ValueRange upperBounds, mlir::ValueRange steps, llvm::function_ref bodyBuilderFn){ return mlir::scf::ParallelOp::build(odsBuilder, odsState, lowerBounds, upperBounds, steps, bodyBuilderFn); }, "ods_builder"_a, "ods_state"_a, "lower_bounds"_a, "upper_bounds"_a, "steps"_a, "body_builder_fn"_a) -.def_static("parse", &mlir::scf::ParallelOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::ParallelOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ParallelOp::verifyInvariants) -.def("verify", &mlir::scf::ParallelOp::verify) -.def_static("get_canonicalization_patterns", &mlir::scf::ParallelOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def_prop_ro("loop_regions", &mlir::scf::ParallelOp::getLoopRegions) -.def_prop_ro("loop_induction_vars", &mlir::scf::ParallelOp::getLoopInductionVars) -.def_prop_ro("loop_lower_bounds", &mlir::scf::ParallelOp::getLoopLowerBounds) -.def_prop_ro("loop_steps", &mlir::scf::ParallelOp::getLoopSteps) -.def_prop_ro("loop_upper_bounds", &mlir::scf::ParallelOp::getLoopUpperBounds) -.def("get_successor_regions", &mlir::scf::ParallelOp::getSuccessorRegions, "point"_a, "regions"_a) -.def_prop_ro("induction_vars", &mlir::scf::ParallelOp::getInductionVars) -.def_prop_ro("num_loops", &mlir::scf::ParallelOp::getNumLoops) -.def_prop_ro("num_reductions", &mlir::scf::ParallelOp::getNumReductions) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ParallelOp__ = nb::class_>(m, "TypeIDResolver[scf::ParallelOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ParallelOp>::resolveTypeID) -; - -auto mlir_scf_detail_ReduceOpGenericAdaptorBase = nb::class_(m, "ReduceOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ReduceOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::ReduceOpGenericAdaptorBase::getAttributes) -.def_prop_ro("reductions", &mlir::scf::detail::ReduceOpGenericAdaptorBase::getReductions) -.def_prop_ro("regions", &mlir::scf::detail::ReduceOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_ReduceOpAdaptor = nb::class_(m, "ReduceOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ReduceOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ReduceOp = nb::class_(m, "ReduceOp") -.def_static("attribute_names", &mlir::scf::ReduceOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::ReduceOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ReduceOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ReduceOp::getODSOperands, "index"_a) -.def_prop_ro("operands", &mlir::scf::ReduceOp::getOperands) -.def_prop_ro("operands_mutable", &mlir::scf::ReduceOp::getOperandsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::ReduceOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ReduceOp::getODSResults, "index"_a) -.def_prop_ro("reductions", &mlir::scf::ReduceOp::getReductions) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange operands){ return mlir::scf::ReduceOp::build(odsBuilder, odsState, operands); }, "ods_builder"_a, "ods_state"_a, "operands"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState){ return mlir::scf::ReduceOp::build(odsBuilder, odsState); }, "ods_builder"_a, "ods_state"_a) -.def("verify_invariants_impl", &mlir::scf::ReduceOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ReduceOp::verifyInvariants) -.def("verify_regions", &mlir::scf::ReduceOp::verifyRegions) -.def("get_mutable_successor_operands", &mlir::scf::ReduceOp::getMutableSuccessorOperands, "point"_a) -.def_static("parse", &mlir::scf::ReduceOp::parse, "parser"_a, "result"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ReduceOp__ = nb::class_>(m, "TypeIDResolver[scf::ReduceOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ReduceOp>::resolveTypeID) -; - -auto mlir_scf_detail_ReduceReturnOpGenericAdaptorBase = nb::class_(m, "ReduceReturnOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::ReduceReturnOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::ReduceReturnOpGenericAdaptorBase::getAttributes) -; - -auto mlir_scf_ReduceReturnOpAdaptor = nb::class_(m, "ReduceReturnOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::ReduceReturnOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_ReduceReturnOp = nb::class_(m, "ReduceReturnOp") -.def_static("attribute_names", &mlir::scf::ReduceReturnOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::ReduceReturnOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::ReduceReturnOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::ReduceReturnOp::getODSOperands, "index"_a) -.def_prop_ro("result", &mlir::scf::ReduceReturnOp::getResult) -.def_prop_ro("result_mutable", &mlir::scf::ReduceReturnOp::getResultMutable) -.def("get_ods_result_index_and_length", &mlir::scf::ReduceReturnOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::ReduceReturnOp::getODSResults, "index"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::Value result){ return mlir::scf::ReduceReturnOp::build(odsBuilder, odsState, result); }, "ods_builder"_a, "ods_state"_a, "result"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::Value result){ return mlir::scf::ReduceReturnOp::build(odsBuilder, odsState, resultTypes, result); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "result"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::scf::ReduceReturnOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::scf::ReduceReturnOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::ReduceReturnOp::verifyInvariants) -.def("verify", &mlir::scf::ReduceReturnOp::verify) -.def_static("parse", &mlir::scf::ReduceReturnOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::scf::ReduceReturnOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_ReduceReturnOp__ = nb::class_>(m, "TypeIDResolver[scf::ReduceReturnOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::ReduceReturnOp>::resolveTypeID) -; - -auto mlir_scf_detail_WhileOpGenericAdaptorBase = nb::class_(m, "WhileOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::WhileOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::WhileOpGenericAdaptorBase::getAttributes) -.def_prop_ro("before", &mlir::scf::detail::WhileOpGenericAdaptorBase::getBefore) -.def_prop_ro("after", &mlir::scf::detail::WhileOpGenericAdaptorBase::getAfter) -.def_prop_ro("regions", &mlir::scf::detail::WhileOpGenericAdaptorBase::getRegions) -; - -auto mlir_scf_WhileOpAdaptor = nb::class_(m, "WhileOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::WhileOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_WhileOp = nb::class_(m, "WhileOp") -.def_static("attribute_names", &mlir::scf::WhileOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::WhileOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::WhileOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::WhileOp::getODSOperands, "index"_a) -.def_prop_ro("inits", &mlir::scf::WhileOp::getInits) -.def_prop_ro("inits_mutable", &mlir::scf::WhileOp::getInitsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::WhileOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::WhileOp::getODSResults, "index"_a) -.def_prop_ro("results", &mlir::scf::WhileOp::getResults) -.def_prop_ro("before", &mlir::scf::WhileOp::getBefore) -.def_prop_ro("after", &mlir::scf::WhileOp::getAfter) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange inits, llvm::function_ref beforeBuilder, llvm::function_ref afterBuilder){ return mlir::scf::WhileOp::build(odsBuilder, odsState, resultTypes, inits, beforeBuilder, afterBuilder); }, "ods_builder"_a, "ods_state"_a, "result_types"_a, "inits"_a, "before_builder"_a, "after_builder"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::scf::WhileOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def_static("parse", &mlir::scf::WhileOp::parse, "parser"_a, "result"_a) -.def("verify_invariants_impl", &mlir::scf::WhileOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::WhileOp::verifyInvariants) -.def("verify", &mlir::scf::WhileOp::verify) -.def_static("get_canonicalization_patterns", &mlir::scf::WhileOp::getCanonicalizationPatterns, "results"_a, "context"_a) -.def("get_entry_successor_operands", &mlir::scf::WhileOp::getEntrySuccessorOperands, "point"_a) -.def("get_successor_regions", &mlir::scf::WhileOp::getSuccessorRegions, "point"_a, "regions"_a) -.def_prop_ro("loop_regions", &mlir::scf::WhileOp::getLoopRegions) -.def_prop_ro("region_iter_args", &mlir::scf::WhileOp::getRegionIterArgs) -.def_prop_ro("yielded_values_mutable", &mlir::scf::WhileOp::getYieldedValuesMutable) -.def_prop_ro("condition_op", &mlir::scf::WhileOp::getConditionOp) -.def_prop_ro("yield_op", &mlir::scf::WhileOp::getYieldOp) -.def_prop_ro("before_arguments", &mlir::scf::WhileOp::getBeforeArguments) -.def_prop_ro("after_arguments", &mlir::scf::WhileOp::getAfterArguments) -.def_prop_ro("before_body", &mlir::scf::WhileOp::getBeforeBody) -.def_prop_ro("after_body", &mlir::scf::WhileOp::getAfterBody) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_WhileOp__ = nb::class_>(m, "TypeIDResolver[scf::WhileOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::WhileOp>::resolveTypeID) -; - -auto mlir_scf_detail_YieldOpGenericAdaptorBase = nb::class_(m, "YieldOpGenericAdaptorBase") -.def(nb::init(), "attrs"_a, "properties"_a, "regions"_a) -.def(nb::init(), "op"_a) -.def("get_ods_operand_index_and_length", &mlir::scf::detail::YieldOpGenericAdaptorBase::getODSOperandIndexAndLength, "index"_a, "ods_operands_size"_a) -.def_prop_ro("attributes", &mlir::scf::detail::YieldOpGenericAdaptorBase::getAttributes) -; - -auto mlir_scf_YieldOpAdaptor = nb::class_(m, "YieldOpAdaptor") -.def(nb::init(), "op"_a) -.def("verify", &mlir::scf::YieldOpAdaptor::verify, "loc"_a) -; - -auto mlir_scf_YieldOp = nb::class_(m, "YieldOp") -.def_static("attribute_names", &mlir::scf::YieldOp::getAttributeNames) -.def_static("operation_name", &mlir::scf::YieldOp::getOperationName) -.def("get_ods_operand_index_and_length", &mlir::scf::YieldOp::getODSOperandIndexAndLength, "index"_a) -.def("get_ods_operands", &mlir::scf::YieldOp::getODSOperands, "index"_a) -.def_prop_ro("results", &mlir::scf::YieldOp::getResults) -.def_prop_ro("results_mutable", &mlir::scf::YieldOp::getResultsMutable) -.def("get_ods_result_index_and_length", &mlir::scf::YieldOp::getODSResultIndexAndLength, "index"_a) -.def("get_ods_results", &mlir::scf::YieldOp::getODSResults, "index"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState){ return mlir::scf::YieldOp::build(odsBuilder, odsState); }, "ods_builder"_a, "ods_state"_a) -.def_static("build", [](mlir::OpBuilder & odsBuilder, mlir::OperationState & odsState, mlir::ValueRange results){ return mlir::scf::YieldOp::build(odsBuilder, odsState, results); }, "ods_builder"_a, "ods_state"_a, "results"_a) -.def_static("build", [](mlir::OpBuilder & _, mlir::OperationState & odsState, mlir::TypeRange resultTypes, mlir::ValueRange operands, llvm::ArrayRef attributes){ return mlir::scf::YieldOp::build(_, odsState, resultTypes, operands, attributes); }, "_"_a, "ods_state"_a, "result_types"_a, "operands"_a, "attributes"_a) -.def("verify_invariants_impl", &mlir::scf::YieldOp::verifyInvariantsImpl) -.def("verify_invariants", &mlir::scf::YieldOp::verifyInvariants) -.def("get_mutable_successor_operands", &mlir::scf::YieldOp::getMutableSuccessorOperands, "point"_a) -.def_static("parse", &mlir::scf::YieldOp::parse, "parser"_a, "result"_a) -.def("get_effects", &mlir::scf::YieldOp::getEffects, "effects"_a) -; - -auto mlir_detail_TypeIDResolver___mlir_scf_YieldOp__ = nb::class_>(m, "TypeIDResolver[scf::YieldOp]") -.def_static("resolve_type_id", &mlir::detail::TypeIDResolver< ::mlir::scf::YieldOp>::resolveTypeID) -; - -auto mlir_scf_LoopNest = nb::class_(m, "LoopNest") -; - -}