Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for _composite_op (0.17 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

            {rewriter.getNamedAttr("approx", rewriter.getBoolAttr(false))});
        auto composite_op = rewriter.create<stablehlo::CompositeOp>(
            output_mul.getLoc(), func.getResultTypes()[0],
            SmallVector<Value>{erf_input->getOperand(0)}, MakeCompositeName(kGelu),
            composite_attrs, func.getSymName());
        rewriter.replaceAllOpUsesWith(output_mul, composite_op);
        // Note these must be erased in reverse topo order to avoid
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_composite_to_tfl_custom.cc

    namespace {
    bool IsSupportedComposite(::mlir::stablehlo::CompositeOp op) {
      // List of supported composites to represent using CustomOp.
      return llvm::is_contained(
          {"odml.update_kv_cache", "odml.scaled_dot_product_attention"},
          op.getName());
    }
    
    bool IsKVCacheCompositeOp(::mlir::stablehlo::CompositeOp op) {
      return op.getName() == "odml.update_kv_cache";
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool_patterns.td

    
    // See the function doc in the header file.
    def GetPadOpType : NativeCodeCall<
      "GetPadOpType((*$0.begin()).getDefiningOp<mhlo::CompositeOp>())">;
    
    // See the function doc in the header file.
    def GetAvgPoolOpPadAttr: 
      NativeCodeCall<"GetAvgPoolOpPadAttr($_builder, (*$0.begin()).getDefiningOp<mhlo::CompositeOp>())">;
    
    // Returns true if the provided padding in the composite op can *not* be 
    // satisfied by SAME or VALID tensorflow padding.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.h

    DenseIntElementsAttr GetPadOpAttr(Builder& builder, mhlo::CompositeOp op);
    
    // Given a Composite op that wraps a core.aten.avg_pool2d, and assuming that
    // the padding part is extracted into a tfl.pad op prior to a
    // tfl.average_pool_2d, this function finds the return type of the needed
    // tfl.pad .
    ShapedType GetPadOpType(mhlo::CompositeOp op);
    
    // Given a Composite op that wraps a core.aten.avg_pool2d, finds the padding
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc

    mlir::LogicalResult ValidateVarHandle(TF::VarHandleOp var_handle_op) {
      auto composite_ops = GetCompositeResourceUserNames(var_handle_op);
      if (!composite_ops.empty())
        return var_handle_op.emitOpError()
               << "expects users to be 'tf.ReadVariableOp' or "
                  "'tf.AssignVariableOp', got ["
               << llvm::join(composite_ops.begin(), composite_ops.end(), ", ")
               << "]";
    
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.cc

    #include "tensorflow/compiler/mlir/lite/transforms/passes.h"  // IWYU pragma: keep
    #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h"  // IWYU pragma: keep
    
    namespace mlir {
    namespace odml {
    
    using mhlo::CompositeOp;
    
    // Struct for holding composite attrs for torch average pool as CC types.
    struct TorchAvgPoolData {
      int n;  // Batch.
      int c;  // Channels.
    
      int h_in;  // Input height.
      int w_in;  // Input width.
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

          return op->emitError("expected exactly one called_computation");
    
        auto decomposition = mlir::cast<FlatSymbolRefAttr>(calledComputations[0]);
    
        auto composite = rewriter.create<mlir::stablehlo::CompositeOp>(
            op.getLoc(), op.getResultTypes(), op.getOperands(), name.str(), attrs,
            decomposition.getValue());
        rewriter.replaceOp(op, composite.getResults());
        return success();
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

    Translator::BuildVhloCompositeV1Op(mlir::vhlo::CompositeOpV1 composite_op,
                                       const std::vector<int32_t>& operands,
                                       const std::vector<int32_t>& results,
                                       std::string op_name) {
      uint32_t opcode_index =
          GetOpcodeIndex(op_name, tflite::BuiltinOperator_STABLEHLO_COMPOSITE);
    
      int32_t api_version = composite_op.getVersion()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/tests/prepare-composite-functions-tf.mlir

    // CHECK-NEXT:  %0:2 = "tfl.custom"(%arg0, %arg1, %arg2) <{custom_code = "my_composite_op", custom_option = #tfl<const_bytes : "0x6578616D706C655F6F7074696F6E006578616D706C655F737472000A76616C756520312E30310002281A0201020A120414042401">}> : (tensor<4x4xf32>,...
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 122.1K bytes
    - Viewed (0)
Back to top