Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for GetBody (0.41 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        rewriter.inlineRegionBefore(graph.getNodes(), executor_graph.getBody(),
                                    executor_graph.getBody().end());
    
        // Add terminator of tf_executor::graph
        rewriter.setInsertionPointToEnd(&executor_graph.getBody().front());
        rewriter.create<tf_executor::FetchOp>(loc);
    
        // Add terminator of func
        rewriter.setInsertionPointToEnd(&func.getBody().front());
        rewriter.create<func::ReturnOp>(loc);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

      auto func_op = module_op->lookupSymbol<func::FuncOp>("fully_quantized_add");
      ASSERT_THAT(func_op, NotNull());
    
      auto add_op_itr = func_op.getBody().op_begin<mlir::stablehlo::AddOp>();
      ASSERT_THAT(add_op_itr,
                  Ne(func_op.getBody().op_end<mlir::stablehlo::AddOp>()));
    
      EXPECT_TRUE(IsOpFullyQuantized(*add_op_itr));
    }
    
    TEST_F(IsOpFullyQuantizedTest, FalseIfOpNotQuantized) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_head_tail_outside_compilation.cc

          /*operands=*/llvm::ArrayRef<Value>{}, cluster->getAttrs());
      new_cluster.getBody().takeBody(cluster.getBody());
    
      auto operand_not_in_cluster = [&](mlir::OpOperand& operand) {
        return !new_cluster.getOperation()->isProperAncestor(operand.getOwner());
      };
      for (auto result :
           llvm::zip(new_cluster.GetBody().getTerminator()->getOperands(),
                     new_cluster.getResults()))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

          // and packed args.
          arg.replaceAllUsesWith(
              new_replicate.GetBody().getArgument(arg.getArgNumber() + 1));
        }
      }
      for (auto& op : llvm::make_early_inc_range(replicate.GetBody())) {
        op.moveBefore(&new_replicate.GetBody(), new_replicate.GetBody().end());
      }
      replicate.replaceAllUsesWith(new_replicate);
      replicate.erase();
      return new_replicate;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

                        IRMapping& mapper) {
      Block& main_body = dst_graph_op.GetBody();
    
      // Take the reference of the main graph's FetchOp to later move to the end.
      FetchOp main_fetch_op = dst_graph_op.GetFetch();
    
      Block& save_func_body = src_graph_op.GetBody();
      for (Operation& op : save_func_body.without_terminator()) {
        main_body.push_back(op.clone(mapper));
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

        type = FunctionType::get(context, types, result_types);
      }
    
      auto outlined_func = builder.create<func::FuncOp>(loc, name, type);
      outlined_func.getBody().takeBody(region);
      Region& func_region = outlined_func.getBody();
    
      // Replace all external uses with block args and update uses.
      llvm::SmallVector<Value, 4> new_args;
      new_args.reserve(extern_values.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

        // Add associated inner op result to operands of the YieldOp.
        yield_operands.push_back(old_result.inner_op_result);
      }
    
      // Create YieldOp for the new island.
      OpBuilder builder(&new_island.GetBody(), new_island.GetBody().end());
      return builder.create<YieldOp>(new_island.getLoc(), yield_operands);
    }
    
    // Moves inner ops (excluding last op/YieldOp) from islands being merged into
    // the new merged island.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_island_coarsening.cc

          /*controlInputs=*/island.getOperands());
      new_island.getBody().push_back(new Block);
    
      // Move the operations in the new island, gather the results of the new yield.
      Block& island_body = new_island.GetBody();
      SmallVector<Value, 16> yield_operands;
      for (IslandOp island : islands) {
        Operation& wrapped_op = island.GetBody().front();
        wrapped_op.moveBefore(&island_body, island_body.end());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

          convert.GetCompositeOpName());
      EXPECT_EQ(fused_lstm_func_.getNumArguments(), 5);
      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
    
      auto transpose_op = fused_lstm_func_.getBody().front().begin();
      transpose_op++;
      EXPECT_EQ(mlir::cast<RankedTensorType>(transpose_op->getOperand(0).getType())
                    .getDimSize(0),
                3);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

          new_while_op.getCond().takeBody(while_op.getCond());
          new_while_op.getBody().takeBody(while_op.getBody());
          llvm::BitVector erase_indices;
          UpdateTerminatorArguments(new_while_op.getBody(), args_to_erase,
                                    erase_indices);
          llvm::BitVector body_bit_vector(
              new_while_op.getBody().front().getNumArguments());
          for (auto i : args_to_erase) body_bit_vector.set(i);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
Back to top