Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 86 for GetOperation (0.2 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

              TPUHostComputationExpansionPass> {
      void runOnOperation() override;
    };
    
    void TPUHostComputationExpansionPass::runOnOperation() {
      OpBuilder builder(&getContext());
      getOperation().walk([&](tf_device::ClusterOp cluster) {
        ExpandHeadOutsideCompiledOps(cluster, &builder);
      });
    }
    
    }  // anonymous namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc

              UnfoldLargeSplatConstantPass> {
     public:
      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(UnfoldLargeSplatConstantPass)
    
      void runOnOperation() override {
        auto module = getOperation();
    
        mlir::OpBuilder op_builder(&module.getBodyRegion());
        module.walk([&](mlir::arith::ConstantOp const_op) {
          MaybeUnfoldLargeSplatConstant(&op_builder, const_op);
        });
      }
    
     private:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

        return success();
      }
    };
    
    void ConvertTpuModelToCpuPass::runOnOperation() {
      MLIRContext* ctx = &getContext();
      RewritePatternSet patterns(ctx);
      ModuleOp module_op = getOperation();
    
      patterns.add<ReplaceTpuPartitionedCallOpWithPartitionedCallOp,
                   ReplaceBatchFunctionOpToPartitionedCallOp>(ctx);
      patterns.add<RemoveTpuOp>(ctx);
      patterns.add<RemoveIdentity>(ctx);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

    void ConvertCustomAggregationOpToQuantStatsPass::runOnOperation() {
      MLIRContext *ctx = &getContext();
      RewritePatternSet patterns(ctx);
      func::FuncOp func = getOperation();
    
      patterns.add<ConvertCustomAggregationOpToQuantStats>(ctx);
      if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) {
        func.emitError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/optimize_op_order.cc

      void runOnOperation() override;
    };
    
    void OptimizeOpOrderPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      auto func = getOperation();
      auto* ctx = func.getContext();
      patterns.add<PushDownDequantize>(ctx);
      if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) {
        signalPassFailure();
      }
    }
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow_to_stablehlo/tf_to_stablehlo.cc

        }
    
        llvm::SourceMgr source_mgr;
        source_mgr.AddNewSourceBuffer(std::move(file), llvm::SMLoc());
        auto module = parseSourceFile<ModuleOp>(source_mgr, context);
        if (module->getOperation() == nullptr) {
          return absl::AbortedError("Failed to parse input MLIR model.");
        }
    
        return quant::stablehlo::ImportedMlirModuleOp(std::move(module), nullptr);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 22:58:42 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

        }
        return_op->setOperand(0, new_result);
        rewriter.eraseOp(req_op);
    
        return success();
      }
    };
    
    void MergeFusionWithDequantizePass::runOnOperation() {
      ModuleOp module_op = getOperation();
      MLIRContext* ctx = module_op.getContext();
      RewritePatternSet patterns(ctx);
      patterns.add<MergeFusionWithUniformDequantizePattern>(ctx);
      if (failed(applyPatternsAndFoldGreedily(module_op, std::move(patterns)))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/verify_tfxla_legalization.cc

        emitError(op->getLoc()) << "Could not legalize op: " << op->getName();
        return false;
      }
      return true;
    }
    
    void VerifyTFXLALegalization::runOnOperation() {
      Operation* func_op = getOperation();
      ConversionTarget default_conversion_target =
          GetDefaultLegalConversionTargets(getContext(), legalize_chlo_);
    
      bool has_invalid_ops = false;
      func_op->walk([&](Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc

    }
    
    inline bool IsJaxRandomNormal(mlir::func::FuncOp func) {
      return func.getName().contains("tfl_wrapped_jax_random_normal");
    }
    
    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;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc

                                    expressedType, fqOp.getIsSigned());
      }
    };
    
    void ConvertSimulatedQuantPass::runOnOperation() {
      bool hadFailure = false;
      auto func = getOperation();
      RewritePatternSet patterns(func.getContext());
      auto *ctx = func.getContext();
      patterns.add<ConstFakeQuantRewrite, ConstFakeQuantPerAxisRewrite>(
          ctx, &hadFailure);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top