Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 173 for rewrite (0.2 sec)

  1. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc

      region.front().eraseArguments(0, region.getNumArguments());
    }
    
    // Rewrites an `mhlo.if` op or its region. If `region_idx` is not set, the op
    // operands and results are rewritten. If `region_idx` is set, region
    // `region_idx` is rewritten to take in and return an additional token. Returns
    // true if the op or its region was rewritten.
    bool ProcessRegionIfOp(OpBuilder& builder, IfOp region_if,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc

          // of its number of users.
          rewriter.setInsertionPointAfter(op);
          // create new F16 constant op in that location
          ConstantOp new_const = rewriter.create<ConstantOp>(
              op->getLoc(), new_result_type, new_value_attr);
          ConvertOp dcast =
              rewriter.create<ConvertOp>(op->getLoc(), old_result_type, new_const);
          // replace all convert ops with dq op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

    //===----------------------------------------------------------------------===//
    // The pass to rewrite the TFR function call ops by TF ops. The callee of the
    // TFR function call defines the signatures of the TF ops.
    //
    namespace mlir {
    namespace TFR {
    
    namespace {
    
    // This pattern is to rewrite the "tfr.call" op and the "tfr.cast" ops on the
    // operands by a TF op with "tfr.cast" ops on the results. The result type of
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc

    #include "mlir/Pass/Pass.h"  // from @llvm-project
    #include "mlir/Pass/PassManager.h"  // from @llvm-project
    #include "mlir/Pass/PassRegistry.h"  // from @llvm-project
    #include "mlir/Rewrite/FrozenRewritePatternSet.h"  // from @llvm-project
    #include "mlir/Support/LLVM.h"  // from @llvm-project
    #include "mlir/Support/LogicalResult.h"  // from @llvm-project
    #include "mlir/Support/TypeID.h"  // from @llvm-project
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

            operand = rewriter.create<TF::CastOp>(
                op.getLoc(), expected_type, operand,
                /*Truncate=*/rewriter.getBoolAttr(false));
          }
          casted_operands.push_back(operand);
        }
    
        auto call = rewriter.create<func::CallOp>(
            op->getLoc(), main_fn.getSymName(), main_fn.getResultTypes(),
            casted_operands);
        rewriter.replaceOp(op, call->getResults());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

            RankedTensorType::get({cur_rank}, rewriter.getIntegerType(64));
        auto new_shape_const_attr =
            DenseElementsAttr::get(shape_spec_type, new_shape.getShape());
        rewriter.setInsertionPointAfter(weight_op);
        auto new_shape_const = rewriter.create<arith::ConstantOp>(
            weight_op->getLoc(), shape_spec_type, new_shape_const_attr);
        auto reshape_op = rewriter.create<TF::ReshapeOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/block.go

    }
    
    // resetWithControl resets b and adds control v.
    // It is equivalent to b.Reset(kind); b.AddControl(v),
    // except that it is one call instead of two and avoids a bounds check.
    // It is intended for use by rewrite rules, where this matters.
    func (b *Block) resetWithControl(kind BlockKind, v *Value) {
    	b.Kind = kind
    	b.ResetControls()
    	b.Aux = nil
    	b.AuxInt = 0
    	b.Controls[0] = v
    	v.Uses++
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/aot/tfcompile.bzl

            test_name = name + "_test"
            test_file = test_name + ".cc"
    
            template_file = "//tensorflow/compiler/aot:test"
            template_file += if_oss("", "_google") + ".cc"
    
            # Rule to rewrite the template_file to produce the test_file.
            native.genrule(
                name = ("gen_" + test_name),
                testonly = 1,
                srcs = [
                    template_file,
                    header_file,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 19:18:08 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_dump_tensor_op.cc

            // The op is disabled by default. Otherwise, values will be saved
            // during calibration.
            rewriter.getNamedAttr("enabled", rewriter.getBoolAttr(enabled)),
            rewriter.getNamedAttr("func_name", rewriter.getStringAttr(func_name)),
            rewriter.getNamedAttr("node_name", rewriter.getStringAttr(node_name)),
        };
        return dump_attributes;
      }
    
      StringAttr DuplicateFunction(Operation *op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 22:55:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/expr.go

    	}
    
    	if n.Op() == ir.OCALLFUNC && n.Fun.Op() == ir.OCLOSURE {
    		directClosureCall(n)
    	}
    
    	if ir.IsFuncPCIntrinsic(n) {
    		// For internal/abi.FuncPCABIxxx(fn), if fn is a defined function, rewrite
    		// it to the address of the function of the ABI fn is defined.
    		name := n.Fun.(*ir.Name).Sym().Name
    		arg := n.Args[0]
    		var wantABI obj.ABI
    		switch name {
    		case "FuncPCABI0":
    			wantABI = obj.ABI0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top