Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 115 for GetBody (0.13 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

      }
      return success();
    }
    
    void RewriteTPUEmbeddingOps::runOnOperation() {
      func::FuncOp func = getOperation();
      if (failed(RunOnRegion(&func.getBody()))) return signalPassFailure();
    
      func.walk([&](Operation* op) {
        for (Region& region : op->getRegions()) {
          if (failed(RunOnRegion(&region))) return signalPassFailure();
        }
      });
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

               << replicate.getN() << ")";
      }
    
      // add block arg to region. This is in $body.
      unsigned block_arg_idx = replicate.GetNumReplicatedBlockArguments();
      Block& block = replicate.GetBody();
      block_arg = block.insertArgument(block_arg_idx, type, replicate.getLoc());
    
      // add to $replicated_inputs. This also updates OperandSegmentSizeAttr.
      replicate.getReplicatedInputsMutable().append(inputs);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      // Create new function and extract region body into the function.
      auto outlined_func = builder.create<func::FuncOp>(loc, name, type);
      Region& func_region = outlined_func.getBody();
      func_region.takeBody(region);
      Block& first_block = func_region.front();
    
      // Replace all external uses with function arguments.
      for (auto it : llvm::enumerate(extern_values)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

      // Create the ControlNodeOp.
      auto ctrl_op = op_builder.create<mlir::TFL::ControlNodeOp>(
          op_loc, cloned_op->getResultTypes(),
          mlir::TFL::ControlType::get(op->getContext()), control_tokens);
      ctrl_op.getBody().takeBody(region);
    
      // Store the control_token output for use by downstream nodes.
      maybe_control_node->second.outgoing = ctrl_op.getControl();
    
      // Remove the original op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc

      if (result_tuple_ty.size() != 1) return;
      auto result_ty = mlir::dyn_cast<ShapedType>(result_tuple_ty.getType(0));
    
      func.eraseBody();
      func.addEntryBlock();
      ImplicitLocOpBuilder builder(func.getLoc(), func.getBody());
      llvm::SmallVector<int32_t> result_shape_i32;
      auto result_shape = result_ty.getShape();
      for (auto element : result_shape) {
        result_shape_i32.push_back(static_cast<int32_t>(element));
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/passes/hoist_broadcast_read.cc

    }
    
    // Get the reads to hoist in the `replicate`.
    LogicalResult GetReads(FuncOp func, ReplicateOp replicate,
                           llvm::SmallVector<ReadVariableOp, 4>& reads) {
      for (Operation& op : replicate.getBody().front()) {
        if (auto read = llvm::dyn_cast<ReadVariableOp>(&op)) {
          bool is_cpu_read;
          if (failed(IsCpuRead(func, read, is_cpu_read))) return failure();
          if (is_cpu_read) reads.push_back(read);
        }
    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/quantization/tensorflow/passes/quantize_composite_functions.cc

        bool enable_per_channel_quantization) {
      // A map to find an attribute from its identifier.
      llvm::StringMap<Attribute> identifier_to_attr;
    
      for (Operation& inner_op : float_func.getBody().front().getOperations()) {
        if (!inner_op.hasAttr(kAttrMapAttribute)) continue;
        // Insert quantization related attribute if they exists. Quantization
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  8. src/net/http/request_test.go

    			t.Errorf("test[%d]: Body = nil", i)
    			continue
    		}
    		if req.GetBody == nil {
    			t.Errorf("test[%d]: GetBody = nil", i)
    			continue
    		}
    		slurp1, err := io.ReadAll(req.Body)
    		if err != nil {
    			t.Errorf("test[%d]: ReadAll(Body) = %v", i, err)
    		}
    		newBody, err := req.GetBody()
    		if err != nil {
    			t.Errorf("test[%d]: GetBody = %v", i, err)
    		}
    		slurp2, err := io.ReadAll(newBody)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/split_merged_operands.cc

      }
      return success();
    }
    
    void SplitMergedOperandsPass::runOnOperation() {
      llvm::DenseSet<Value> stateful_values;
      auto func = getOperation();
      OpBuilder builder(func);
      for (auto& bb : func.getBody()) {
        for (auto& op : bb) {
          if (failed(DuplicateValueIfNeeded(&op, &stateful_values, &builder))) {
            func.emitError() << "Failed to duplicate values for the stateful op\n";
            return signalPassFailure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

                                    new_while_op.getCond().end());
        rewriter.inlineRegionBefore(while_op.getBody(), new_while_op.getBody(),
                                    new_while_op.getBody().end());
    
        auto &new_body_block = new_while_op.getBody().front();
        auto &new_cond_block = new_while_op.getCond().front();
        auto &new_body_yield = *new_body_block.getTerminator();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
Back to top