Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 89 for legalization (0.16 sec)

  1. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

            /*tf2xla_fallback_device_type=*/device_type, enable_op_fallback));
      }
    
      // This has to run after legalization.
      pm.addNestedPass<mlir::func::FuncOp>(
          mlir::mhlo::CreateInfeedsOpsXlaAdjustLayoutPass());
    
      if (lower_to_xla_hlo) {
        // This has to run after legalization to delete non legal but dead ops.
        // This must run before Shape Inference.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/passes.td

      let description = [{
          Pass which analyzes the variables in the graph and add an attribute whether
          variables should be legalized to TFLite native ones.
          This pass needs to run post TF->TFL legalization and before variable
          legalization.
      }];
      let constructor = "CreateAnalyzeVariablesPass()";
      let dependentDialects = ["TFL::TensorFlowLiteDialect"];
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/tf_tfl_passes.cc

      // broadcasting support. This needs to be run immediately after HLO->TF
      // legalization; otherwise other passes like `ConvertTFBroadcastTo` will
      // constant fold the newly generated TF broadcast ops and materialize the
      // weights.
      pass_manager.addNestedPass<mlir::func::FuncOp>(
          mlir::TF::CreateBroadcastFoldPass());
    
      // Canonicalization after TF legalization.
      pass_manager.addNestedPass<mlir::func::FuncOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 18:45:51 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util_test.cc

      pass_manager.printAsTextualPipeline(raw_stream);
    
      EXPECT_THAT(pass_description, HasSubstr(kInlinePass));
    }
    
    TEST(LegalizeMlirTest, LegalizesModuleWithDynamicShape) {
      constexpr char legalization[] = R"(
      module attributes {tf.versions = {bad_consumers = [], min_consumer = 0 : i32, producer = 268 : i32}} {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 25 19:54:38 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/tests/compile_mlir_util/constant-folding.mlir

        %1 = "tf.Reshape"(%arg1, %0) : (tensor<19x10xf32>, tensor<2xi64>) -> tensor<10x19xf32>
        func.return %1 : tensor<10x19xf32>
      }
    }
    
    // Tests that foldable ops are constant-folded to enable legalization of ops
    // that require compile time constant operand.
    // "tf.Shape" can only be folded away after shape inference. tf.Reshape can only
    // be lowered when tf.Shape is folded into a constant.
    
    // CHECK-LABEL: HloModule main
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jul 25 02:54:34 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

    }
    
    // Adds the list of ops that are supported on TPU through constant folding which
    // may depend on the inputs shapes not known at this point. Such ops may not
    // have any legalization or canonicalization patterns but shouldn't be marked
    // for outside compilation.
    //
    // TODO(b/177523289): Remove manual handling once we support constant folding
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/legalize_variables.cc

     public:
      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LegalizeVariablesPass)
    
      void runOnOperation() override {
        auto module = getOperation();
        // If TFLite variable legalization is not allowed, then we skip this pass.
        if (auto legalize_tfl_variables_attr =
                module->getAttr(kLegalizeTflVariables)) {
          if (!mlir::cast<BoolAttr>(legalize_tfl_variables_attr).getValue()) return;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

        expressions.push_back(expr);
    
        if (!tensorflow::DataTypeCanUseMemcpy(expr.dtype())) {
          return op_->emitRemark()
                 << "skipping legalization due to unsupported type "
                 << operand.getType();
        }
    
        auto shape_or = expr.GetShape();
        if (!shape_or.ok()) {
          return op_->emitRemark()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tpu_embedding_ops_registry.h

    //    {
    //      ...
    //    }
    class TPUEmbeddingOpsRegistry {
     public:
      // Add the op to the registry.
      //
      // Adding an op here will allow use old bridge legalization from the MLIR
      // bridge with the use of fallback mechanism. Therefore, addition of any op
      // here must have a python test with MLIR bridge enabled to verify that the
      // fallback works correctly.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 14 05:42:28 UTC 2022
    - 2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/cc/pass_pipeline.cc

      pm.addNestedPass<func::FuncOp>(mlir::createCanonicalizerPass());
      pm.addPass(mhlo::createHloLegalizeToStablehloPass());
    }
    
    void AddStablehloQuantToIntPasses(OpPassManager& pm) {
      // StableHLO -> MHLO legalization.
      pm.addPass(mhlo::createStablehloLegalizeToHloPass());
      pm.addNestedPass<func::FuncOp>(mhlo::createMhloQuantLegalizeToIntPass());
      pm.addNestedPass<func::FuncOp>(createCanonicalizerPass());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top