Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 278 for getOperation (0.31 sec)

  1. tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc

                                                 newConstOp);
      return success();
    }
    
    void ConvertConstPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      auto func = getOperation();
      auto *context = &getContext();
      patterns.add<QuantizedConstRewrite>(context);
      (void)applyPatternsAndFoldGreedily(func, std::move(patterns));
    }
    
    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
    - 4.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

    };
    
    // Folds tf.IdentityOp and tf.IdentityNOp if op device and the argument devices
    // from the defining ops match.
    void TensorDeviceCopyConversionPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
    
      auto should_fold_op_func = [&func_op](const Value &arg,
                                            const StringAttr &op_device) {
        // In TFRT TPU, tensor transfer is handled specifically by D2H and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/testing/test_lift_quantizable_spots_as_functions_with_quantization_specs.cc

      if (!quantization_specs.ok()) {
        signalPassFailure();
        return;
      }
    
      pass_manager.addPass(
          CreateLiftQuantizableSpotsAsFunctionsPass(*quantization_specs));
    
      if (failed(pass_manager.run(getOperation()))) {
        signalPassFailure();
      }
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 28 23:21:42 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/batchmatmul_to_einsum.cc

        : public impl::BatchMatMulToEinsumPassBase<BatchMatMulToEinsumPass> {
      void runOnOperation() override;
    };
    
    void BatchMatMulToEinsumPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      auto func = getOperation();
    
      patterns.add<ConvertTFBatchMatMulToEinsumOp<TF::BatchMatMulOp>,
                   ConvertTFBatchMatMulToEinsumOp<TF::BatchMatMulV2Op>>(
          &getContext());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize.cc

        enable_per_channel_quantized_weight_ = enable_per_channel_quantized_weight;
      }
    
     private:
      void runOnOperation() override;
    };
    
    void QuantizePass::runOnOperation() {
      ModuleOp module_op = getOperation();
      MLIRContext& ctx = getContext();
    
      RewritePatternSet patterns(&ctx);
      patterns.add<StableHloQuantization, StableHloQuantizationReverse>(&ctx);
    
      PopulateCommonQuantizationPatterns(ctx, patterns,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 07:08:19 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/verify_quant_legalization.cc

    }
    
    bool IsMhloUniformQuantizedOp(Operation& op) {
      return llvm::isa<mhlo::UniformQuantizeOp, mhlo::UniformDequantizeOp>(op);
    }
    
    void VerifyQuantLegalization::runOnOperation() {
      Operation* func_op = getOperation();
    
      auto walk_result = func_op->walk([&](Operation* op) {
        // Verify all uq and qint types are lowered.
        if (llvm::any_of(op->getOperandTypes(), IsQuantType) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

    void ReduceTypePrecisionPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
      patterns.add<CheckRangeAndConvertI8ToI4, SanitizeGatherOpOutputToI4>(
          &getContext());
      (void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<ModuleOp>> CreateReduceTypePrecisionPass() {
      return std::make_unique<ReduceTypePrecisionPass>();
    }
    
    }  // namespace TFL
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      for (const unsigned operand_index : erase_indices.set_bits()) {
        operand_index < num_in_original ? num_in_tensors-- : num_captured_tensors--;
      }
    
      getOperation()->eraseOperands(erase_indices);
      getOperation()->setAttr(
          operand_segment_size_attr,
          DenseI32ArrayAttr::get(
              getContext(), /*content=*/{num_in_tensors, num_captured_tensors}));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

        if (!isa<TF::IdentityOp, TF::ReadVariableOp>(op)) break;
        v = op->getOperand(0);
      }
      return v;
    }
    
    void AnnotateParameterReplicationPass::runOnOperation() {
      ModuleOp m = getOperation();
      OpBuilder builder(m.getContext());
      m.walk([&](tf_device::ClusterFuncOp cluster_func) {
        auto replicate = cluster_func->getParentOfType<tf_device::ReplicateOp>();
        if (!replicate) return;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

              return op.getCallTargetName() != "stablehlo.composite";
            });
    
        RewritePatternSet patterns(context);
        patterns.add<ReplaceCustomCallWithComposite>(context);
    
        if (failed(applyPartialConversion(getOperation(), target,
                                          std::move(patterns)))) {
          return signalPassFailure();
        }
      }
    };
    
    static PassRegistration<LegalizeStablehloCustomCallToCompositePass>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top