Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 247 for legalize (0.17 sec)

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

    // after this pass is run.
    namespace mlir {
    namespace TFL {
    namespace {
    #define GEN_PASS_DEF_TRIMFUNCTIONSPASS
    #include "tensorflow/compiler/mlir/lite/transforms/passes.h.inc"
    
    // The pass to trim functions before we legalize to TFL
    // dialect using the specified allowlist.
    class TrimFunctionsPass
        : public impl::TrimFunctionsPassBase<TrimFunctionsPass> {
     public:
      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TrimFunctionsPass)
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 07 21:08:41 UTC 2022
    - 4.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/convert_func_to_bfloat16.mlir

      %0 = stablehlo.constant dense<[[1.4, 0.0], [3.1, -0.2]]> : tensor<2x2xf32>
      return %0 : tensor<2x2xf32>
    }
    
    // -----
    
    func.func @constant_elided() -> tensor<2x2xf32> {
      // expected-error @+1 {{failed to legalize operation 'stablehlo.constant' that was explicitly marked illegal}}
      %0 = stablehlo.constant dense_resource<__elided__> : tensor<2x2xf32>
      return %0 : tensor<2x2xf32>
    }
    
    // -----
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 08 22:40:14 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v2/legalize_tf_test.cc

        func.return
      }
    })";
    
    // MLIR which should not legalize at all
    static constexpr char kBadMlirModuleStr[] = R"(
      module attributes {tf.versions = {bad_consumers = [], min_consumer = 0 : i32, producer = 268 : i32}} {
      func.func @main() -> () {
        %0 = tf.Unknown() -> ()
        func.return %0
      }
    })";
    
    // MLIR which should be filtered by the MLIR bridge but fully legalize with the
    // combined bridge.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 23:59:33 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/BUILD

        ],
        deps = [
            "@llvm-project//mlir:AffineDialect",
            "@llvm-project//mlir:QuantOps",
            # Link jit lib to link JIT devices required to run
            # xla-legalize-tf-with-tf2xla pass.
            "//tensorflow/compiler/jit",
            "//tensorflow/compiler/mlir/lite:tensorflow_lite",
            "//tensorflow/compiler/mlir/lite:tensorflow_lite_legalize_tf",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 22:19:26 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_composite_to_tfl_custom.cc

          composite->getLoc(), composite->getResultTypes(),
          composite->getOperands(), composite.getName(),
          CustomOption(&builder, custom_option_buffer));
    }
    
    }  // namespace
    
    // Legalize stablehlo::CompositeOp to TFL::CustomOp for runtime-supported
    // composites. See `IsSupportedComposite` for list of supported ops.
    //
    // Example:
    //   %0 = stablehlo.composite "odml.some_op" <args> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

    constexpr char kTfLiteInputIndices[] = "_tflite_input_indices";
    
    // Legalize operations in functions.
    class LegalizeTFPass : public impl::LegalizeTFPassBase<LegalizeTFPass> {
     public:
      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LegalizeTFPass)
      LegalizeTFPass() = default;
      explicit LegalizeTFPass(bool run_tfl_runtime_verification,
                              bool preserve_assert_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter_test.cc

            return WalkResult::interrupt();
          }
    
          return WalkResult::advance();
        });
    
        if (walk_result.wasInterrupted()) {
          return tsl::errors::Internal("Could not legalize all ops");
        }
    
        return absl::OkStatus();
      }
    
      mlir::func::FuncOp GetMainFunc() {
        func::FuncOp main_func = module_->lookupSymbol<mlir::func::FuncOp>("main");
        EXPECT_TRUE(main_func);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/tf_tfl_translate_cl.cc

        "post-training-quantization",
        llvm::cl::desc("Enable post_training_quantization."),
        llvm::cl::init(false));
    
    // NOLINTNEXTLINE
    opt<bool> legalize_custom_tensor_list_ops(
        "legalize-custom-tensor-list-ops",
        llvm::cl::desc("Convert \"tf.TensorList*\" ops to \"tfl.custom_op\""
                       "if they can all be supported."),
        llvm::cl::init(false));
    
    // NOLINTNEXTLINE
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 20:53:17 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/tfl_stablehlo_pass.cc

     public:
      explicit TflToStablehloPass() : PassWrapper() {}
      StringRef getArgument() const final { return "tfl-parse-stablehlo-ops"; }
      StringRef getDescription() const final {
        return "This pass will legalize TFLite custom Ops to StableHLO ops.";
      }
    
     private:
      void runOnOperation() override;
    
      void getDependentDialects(DialectRegistry& registry) const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jan 24 06:08:43 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

                             OperationPass<ModuleOp>> {
     public:
      StringRef getArgument() const final {
        return "tf-xla-call-module-op-to-stablehlo-pass";
      }
      StringRef getDescription() const final {
        return "Legalize TF_XlaCallModule Op to stablehlo";
      }
      void getDependentDialects(DialectRegistry &registry) const override {
        registry.insert<stablehlo::StablehloDialect, vhlo::VhloDialect,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top