Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 28 for getFunctionType (0.22 sec)

  1. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

      // Handle the entry functions only.
      if (func.getName() != "main" && (!attrs || attrs.empty())) {
        return;
      }
    
      OpBuilder builder(func);
      FunctionType func_type = func.getFunctionType();
      llvm::SmallVector<Type, 4> new_input_types(func_type.getInputs().begin(),
                                                 func_type.getInputs().end());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/convert_session_initializer_to_function.cc

        func->removeAttr("tf_saved_model.exported_names");
    
        ArrayRef<Value> args;
        builder.create<func::CallOp>(session_initializer.getLoc(),
                                     func.getFunctionType().getResults(),
                                     func.getSymName(), args);
      }
      builder.create<func::ReturnOp>(session_initializer.getLoc());
    
      session_initializer.erase();
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 01 05:03:09 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/legalize_tf_while.cc

    void CreateRegionWithCall(func::FuncOp func, Region& region, Location loc) {
      OpBuilder builder(region);
      auto block = builder.createBlock(&region);
      SmallVector<Value, 4> new_operands;
      for (Type t : func.getFunctionType().getInputs())
        new_operands.push_back(block->addArgument(t, loc));
      auto call = builder.create<func::CallOp>(loc, func, new_operands);
      builder.create<YieldOp>(loc, call.getResults());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/passes/rewrite_quantized_io.cc

            returned_value.get().getDefiningOp()->emitError(
                "The producer of quantized type result should be a tfr.cast op.");
            return;
          }
        }
    
        auto new_func_type = builder.getFunctionType(block.getArgumentTypes(),
                                                     terminator->getOperandTypes());
        func.setType(new_func_type);
      });
    }
    
    // Creates an instance of the pass to decompose the TF ops.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/add_functions_for_exported_names.cc

          module_body.push_front(other);
          other.addEntryBlock();
          OpBuilder builder(other.getRegion());
          auto call_op = builder.create<mlir::func::CallOp>(
              f.getLoc(), f.getFunctionType().getResults(), f.getSymName(),
              other.getRegion().getArguments());
          builder.create<mlir::func::ReturnOp>(f.getLoc(), call_op.getResults());
        }
    
        Unexport(f);
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfrt/saved_model/saved_model.cc

        // functions.
        auto func_names = mlir::tf_saved_model::GetExportedNames(func);
        if (func_names.empty()) return mlir::WalkResult::advance();
    
        auto func_type = func.getFunctionType();
    
        // Here we walk through each arguments and find out the input/output names,
        // and input devices, variables used by this function.
        llvm::SmallVector<llvm::StringRef, 4> input_names;
        llvm::SmallVector<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc

    }
    
    void LegalizeJaxRandomPass::runOnOperation() {
      auto func = getOperation();
      if (!IsJaxRandomUniform(func) && !IsJaxRandomNormal(func)) return;
      auto result_tuple_ty =
          mlir::dyn_cast_or_null<TupleType>(func.getFunctionType().getResult(0));
      if (!result_tuple_ty) return;
      if (result_tuple_ty.size() != 1) return;
      auto result_ty = mlir::dyn_cast<ShapedType>(result_tuple_ty.getType(0));
    
      func.eraseBody();
      func.addEntryBlock();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/perception_ops_utils_test.cc

    func::FuncOp createMaxUnpoolingFunc(
        mlir::Builder* builder, const SmallVector<mlir::Type, NInput>& input_types,
        const SmallVector<mlir::Type, NOutput>& output_types) {
      auto func_type = builder->getFunctionType(input_types, output_types);
      auto func = func::FuncOp::create(
          mlir::NameLoc::get(builder->getStringAttr("fused_func")), "fused_func",
          func_type, {});
    
      func.addEntryBlock();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

    void UpdateFuncType(func::FuncOp func) {
      Operation* terminator = func.front().getTerminator();
      auto return_types = llvm::to_vector<4>(terminator->getOperandTypes());
    
      FunctionType func_type = func.getFunctionType();
      if (llvm::ArrayRef(return_types) == func_type.getResults()) return;
    
      auto updated_type =
          FunctionType::get(func.getContext(), func_type.getInputs(), return_types);
      func.setType(updated_type);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.pyi

        def __init__(self, *args, **kwargs) -> None: ...
    
    class Block_Iterator:
        def __init__(self, *args, **kwargs) -> None: ...
    
    class Builder:
        def __init__(self, arg0: MLIRContext) -> None: ...
        def getFunctionType(self, arg0: list[Type], arg1: list[Type]) -> FunctionType: ...
    
    class FloatType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def getBF16(self) -> FloatType: ...
        def getF16(self) -> FloatType: ...
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 09 17:10:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
Back to top