Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for SetArg (0.12 sec)

  1. src/cmd/compile/internal/ssa/copyelim.go

    	// sure that we don't end up doing O(n^2) work
    	// for a chain of n copies.
    	for v != w {
    		x := v.Args[0]
    		v.SetArg(0, w)
    		v = x
    	}
    	return w
    }
    
    // copyelimValue ensures that no args of v are copies.
    func copyelimValue(v *Value) {
    	for i, a := range v.Args {
    		if a.Op == OpCopy {
    			v.SetArg(i, copySource(a))
    		}
    	}
    }
    
    // phielim eliminates redundant phi values from f.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/schedule.go

    	for _, b := range f.Blocks {
    		for _, v := range b.Values {
    			for i, a := range v.Args {
    				if a.Op == OpSPanchored || opcodeTable[a.Op].nilCheck {
    					v.SetArg(i, a.Args[0])
    				}
    			}
    		}
    		for i, c := range b.ControlValues() {
    			if c.Op == OpSPanchored || opcodeTable[c.Op].nilCheck {
    				b.ReplaceControl(i, c.Args[0])
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 15:53:17 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/value.go

    }
    
    func (v *Value) AddArgs(a ...*Value) {
    	if v.Args == nil {
    		v.resetArgs() // use argstorage
    	}
    	v.Args = append(v.Args, a...)
    	for _, x := range a {
    		x.Uses++
    	}
    }
    func (v *Value) SetArg(i int, w *Value) {
    	v.Args[i].Uses--
    	v.Args[i] = w
    	w.Uses++
    }
    func (v *Value) SetArgs1(a *Value) {
    	v.resetArgs()
    	v.AddArg(a)
    }
    func (v *Value) SetArgs2(a, b *Value) {
    	v.resetArgs()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:40:22 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/rewrite.go

    				// of a value so that a x.Uses==1 rule condition
    				// fires reliably.
    				for i, a := range v.Args {
    					if a.Op != OpCopy {
    						continue
    					}
    					aa := copySource(a)
    					v.SetArg(i, aa)
    					// If a, a copy, has a line boundary indicator, attempt to find a new value
    					// to hold it.  The first candidate is the value that will replace a (aa),
    					// if it shares the same block and line and is eligible.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc

    LogicalResult QuantizedConstRewrite::matchAndRewrite(
        QuantizeCastOp qbarrier, PatternRewriter &rewriter) const {
      Attribute value;
    
      // Is the operand a constant?
      if (!matchPattern(qbarrier.getArg(), m_Constant(&value))) {
        return failure();
      }
    
      // Does the qbarrier convert to a quantized type. This will not be true
      // if a quantized type has not yet been chosen or if the cast to an equivalent
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

      // Matches x -> [scast -> scast] -> y, replacing the second scast with the
      // value of x if the casts invert each other.
      auto srcScastOp = getArg().getDefiningOp<StorageCastOp>();
      if (!srcScastOp || srcScastOp.getArg().getType() != getType())
        return OpFoldResult();
      return srcScastOp.getArg();
    }
    
    /// The quantization specification should match the expressed type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

      // Matches x -> [scast -> scast] -> y, replacing the second scast with the
      // value of x if the casts invert each other.
      auto srcScastOp = getArg().getDefiningOp<StorageCastOp>();
      if (!srcScastOp || srcScastOp.getArg().getType() != getType())
        return OpFoldResult();
      return srcScastOp.getArg();
    }
    
    /// The quantization specification should match the expressed type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/quantization/lite/tfl_to_std.cc

        b.setInsertionPoint(op);
        if (auto dq = llvm::dyn_cast<quantfork::DequantizeCastOp>(op)) {
          auto dcast = b.create<DequantizeOp>(dq.getLoc(), dq.getResult().getType(),
                                              dq.getArg());
          dq.getResult().replaceAllUsesWith(dcast);
          if (auto extra_attr = op->getAttr(mlir::quant::kVolatileOpAttrName)) {
            dcast->setAttr(mlir::quant::kVolatileOpAttrName, extra_attr);
          }
          dq.erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 02:50:01 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        if (!tensor_type) return cast_op.getArg();
    
        auto attr_names = tensor_type.getAttrKeys();
        if (attr_names.empty() || attr_names.size() > 1) return cast_op.getArg();
        StringRef tfr_type_attr = attr_names[0].getValue();
        if (!fixed_elt_type_attrs_.contains(tfr_type_attr)) return cast_op.getArg();
    
        Type result_elt_type = GetFixedElementType(tfr_type_attr, rewriter);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        mlir::IntegerAttr axis;
        for (auto& stats_op : stats_ops) {
          rewriter.setInsertionPointAfter(stats_op);
          rewriter.replaceOpWithNewOp<quantfork::StatisticsOp>(
              stats_op, stats_op.getArg(), layer_stats, axis_stats, axis);
        }
        return success();
      }
    };
    
    template <typename SourceOp>
    class ConvertOpStatsToQDQs : public OpRewritePattern<SourceOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
Back to top