Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 825 for getN (0.13 sec)

  1. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

      uint32_t num_replicas = replicate.getN();
      llvm::SmallVector<int32_t, 4> group_assignment_val;
      for (int i = 0; i < num_replicas; ++i) group_assignment_val.push_back(i);
      Value group_assignment = builder.create<ConstOp>(
          block_arg.getLoc(),
          DenseIntElementsAttr::get(
              RankedTensorType::get({1, num_replicas}, builder.getIntegerType(32)),
              group_assignment_val));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  2. test/chan/powser1.go

    	release <- 0
    }
    
    func put(dat rat, out *dch) {
    	<-out.req
    	out.dat <- dat
    }
    
    func get(in *dch) rat {
    	seqno++
    	in.req <- seqno
    	return <-in.dat
    }
    
    // Get one rat from each of n demand channels
    
    func getn(in []*dch) []rat {
    	n := len(in)
    	if n != 2 {
    		panic("bad n in getn")
    	}
    	req := new([2]chan int)
    	dat := new([2]chan rat)
    	out := make([]rat, 2)
    	var i int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 25 22:22:20 UTC 2020
    - 12.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

      StringRef config = recv_op ? recv_op.getConfig() : send_op.getConfig();
    
      // Create XlaRecvTPUEmbeddingDeduplicationData op.
      OpBuilder builder(region);
      auto output_ty =
          RankedTensorType::get({}, VariantType::get(region->getContext()));
      auto dedup_op = builder.create<XlaRecvTPUEmbeddingDeduplicationDataOp>(
          loc, output_ty, config);
    
      // Rewrite RecvTPUEmbeddingActivations op to the corresponding internal op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. test/chan/powser2.go

    }
    
    func put(dat item, out *dch) {
    	<-out.req
    	out.dat <- dat
    }
    
    func get(in *dch) *rat {
    	seqno++
    	in.req <- seqno
    	return (<-in.dat).(*rat)
    }
    
    // Get one item from each of n demand channels
    
    func getn(in []*dch) []item {
    	n := len(in)
    	if n != 2 {
    		panic("bad n in getn")
    	}
    	req := make([]chan int, 2)
    	dat := make([]chan item, 2)
    	out := make([]item, 2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 25 22:22:20 UTC 2020
    - 13.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/hoist_replicate_invariant_resource_writes.cc

        tf_device::ReplicateOp replicate_op,
        llvm::ArrayRef<TF::AssignVariableOp> tail_assign_variable_ops) {
      const auto num_replicas = replicate_op.getN();
      auto return_op = llvm::dyn_cast<tf_device::ReturnOp>(
          replicate_op.getRegion().front().getTerminator());
    
      // Get the new result types.
      // TODO(prakalps): Do not add a value to returned values if it is already
      // returned.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

      for (llvm::StringRef device : device_list) {
        state_vars.push_back(builder->create<TF::VarHandleOp>(
            loc,
            llvm::ArrayRef<Type>{RankedTensorType::get(
                {}, TF::ResourceType::get(llvm::ArrayRef<TensorType>{key_type},
                                          builder->getContext()))},
            llvm::ArrayRef<Value>{},
            llvm::ArrayRef<NamedAttribute>{
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc

    // invariant. Shape ops are rewritten to be invariant when possible, prior to
    // hoisting ops.
    void HoistReplicateInvariantOps(tf_device::ReplicateOp replicate_op) {
      const int num_replicas = replicate_op.getN();
      Block* replicate_block = &replicate_op.GetBody();
    
      // A `ShapeOp` that directly depends on a `tf_device.replicate` param and does
      // not have a virtual device is assumed to return the same shape across all
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc

          continue;
    
        const auto inputs = partitioned_input.getInputs();
        const bool packed_input = partitioned_input.getIsPacked();
        int num_cores_per_replica = partitioned_input.getN();
        if (num_cores_per_replica_attr) {
          num_cores_per_replica = num_cores_per_replica_attr.getInt();
        } else if (packed_input) {
          return partitioned_input->emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

        auto& arg = packed_args.emplace_back();
        arg.ssaName = std::get<0>(argAndType);
        arg.type = std::get<1>(argAndType);
      }
      if (parser.parseRegion(body, packed_args)) return failure();
    
      // Add derived `operandSegmentSizes` attribute based on parsed operands.
      if (!result.attributes.get(kOperandSegmentSizesAttr)) {
        int32_t num_replicated_inputs = replicated_inputs.size() * n;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc

                                      op)))
            return failure();
    
          OpBuilder builder(op);
          auto const_op = builder.create<TF::ConstOp>(
              op->getLoc(), DenseIntElementsAttr::get(
                                RankedTensorType::get({}, builder.getI64Type()),
                                {device_ordinal}));
          op->replaceAllUsesWith(const_op);
          op->erase();
          return WalkResult::advance();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 24 21:01:40 UTC 2023
    - 16.9K bytes
    - Viewed (0)
Back to top