Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 183 for setLoc (0.14 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/transforms/fold_constants_to_subgraph.cc

          (llvm::isa<TFL::ConstOp, TFL::QConstOp, arith::ConstantOp>(const_op)) &&
          "Expect QConst or Const op.");
      OpBuilder builder(func.getBody());
      auto cloned_const_op = const_op->clone();
      cloned_const_op->setLoc(func.getBody().getLoc());
      builder.insert(cloned_const_op);
      // Rewire the usage.
      func.getArgument(argument_index)
          .replaceAllUsesWith(cloned_const_op->getResult(0));
    }
    
    bool IsConstOrQConstInt(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)
  2. src/time/time.go

    		offset += int(buf[2])
    	}
    
    	*t = Time{}
    	t.wall = uint64(nsec)
    	t.ext = sec
    
    	if offset == -1*60 {
    		t.setLoc(&utcLoc)
    	} else if _, localoff, _, _, _ := Local.lookup(t.unixSec()); offset == localoff {
    		t.setLoc(Local)
    	} else {
    		t.setLoc(FixedZone("", offset))
    	}
    
    	return nil
    }
    
    // TODO(rsc): Remove GobEncoder, GobDecoder, MarshalJSON, UnmarshalJSON in Go 2.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 50.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_quantization_unit_loc.cc

              op->getParentOfType<func::FuncOp>().getSymNameAttr().str();
          quantization_unit->set_func_name(func_name);
        }
        QuantizationUnitLoc unit_loc(getContext(), quantization_unit.value());
        op->setLoc(unit_loc);
    
        return success();
      }
    };
    
    void AddQuantizationUnitLocPass::runOnOperation() {
      MLIRContext* ctx = &getContext();
      RewritePatternSet patterns(ctx);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  4. src/time/format.go

    		name, offset, _, _, _ := local.lookup(t.unixSec())
    		if offset == zoneOffset && (zoneName == "" || name == zoneName) {
    			t.setLoc(local)
    			return t, nil
    		}
    
    		// Otherwise create fake zone to record offset.
    		zoneNameCopy := stringslite.Clone(zoneName) // avoid leaking the input value
    		t.setLoc(FixedZone(zoneNameCopy, zoneOffset))
    		return t, nil
    	}
    
    	if zoneName != "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

      Block& entry = entry_func_op->getRegion(0).front();
      for (auto [arg, arg_type, arg_loc] :
           llvm::zip_equal(entry.getArguments(), arg_types, arg_locs)) {
        arg.setType(arg_type);
        arg.setLoc(arg_loc);
      }
    }
    
    // Creates a UniformQuantize op and sets it as return op.
    // The requantize scale and zero point should be determined from the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        return failure();
      }
    
      for (Operation& inner_op : quantized_func.getBody().front().getOperations()) {
        if (!inner_op.hasAttr(kAttrMapAttribute)) continue;
        inner_op.setLoc(main_op->getLoc());
      }
      return success();
    }
    
    // Get the corresponding quantized function name from the given function name.
    std::string GetQuantizedFunctionName(StringRef func_name,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

              if (TF::TensorListSetItemOp set_op =
                      llvm::dyn_cast<TF::TensorListSetItemOp>(use.getOwner())) {
                element_shape = rewriter.create<TF::ShapeOp>(
                    op.getLoc(),
                    tensorflow::GetTypeFromTFTensorShape({-1}, shape_dtype),
                    set_op.getItem());
                element_shape_acquired = true;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc

            bn_op.getLoc(), bn_op.getVariance(), epsilon);
        multiplier = rewriter.create<mhlo::RsqrtOp>(bn_op.getLoc(), multiplier);
        multiplier = rewriter.create<mhlo::MulOp>(bn_op.getLoc(), multiplier,
                                                  bn_op.getScale());
    
        // Compute rhs = offset - mean * multiplier
        Value rhs = rewriter.create<mhlo::MulOp>(bn_op.getLoc(), multiplier,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

      weight_transposed_ =
          Transpose2D(&builder_, weight_, weight_type_, fused_func_op_.getLoc());
      projection_transposed_ = Transpose2D(&builder_, projection_, projection_type_,
                                           fused_func_op_.getLoc());
    
      none_ = CreateNoneValue(&builder_, fused_func_op_.getLoc());
      // Extract input to cifg gates via slicing the weight tensor
      SetWeightForInputToCellGate();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        Type cast_type = quant_type.castFromExpressedType(expressed_type);
        rewriter.setInsertionPointAfter(const_op);
        auto q = rewriter.create<Q>(const_op->getLoc(), cast_type,
                                    const_op->getResult(0));
        auto dq = rewriter.create<DQ>(const_op->getLoc(), expressed_type, q);
        op.setOperand(input_index, dq.getResult());
        return success();
      }
    
      LogicalResult replaceStatsOp(
    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