Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for xla_builder (0.16 sec)

  1. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter_test.cc

    })";
    
    XlaComputation GetTestXlaComputation() {
      XlaBuilder xla_builder("test");
      auto param =
          Parameter(&xla_builder, 0, ShapeUtil::MakeScalarShape(xla::F32), "a");
    
      XlaOp add = xla::Add(param, xla::ConstantR0<float>(&xla_builder, 2.0));
    
      std::vector<XlaOp> tuple_values;
      tuple_values.push_back(add);
    
      xla::Tuple(&xla_builder, tuple_values);
      return xla_builder.Build().value();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.h

      std::unique_ptr<tensorflow::FunctionLibraryDefinition> flib_def_;
      std::unique_ptr<tensorflow::ProcessFunctionLibraryRuntime> pflr_;
      tensorflow::OpKernelContext::Params params_;
    
      xla::XlaBuilder xla_builder_;
    };
    
    }  // namespace mhlo
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util_test.cc

    #include "tensorflow/compiler/mlir/tensorflow/dialect_registration.h"
    #include "tensorflow/compiler/mlir/tensorflow/utils/serialize_mlir_module_utils.h"
    #include "tensorflow/compiler/tf2xla/xla_helpers.h"
    #include "xla/client/xla_builder.h"
    #include "tensorflow/core/framework/function.h"
    #include "tensorflow/core/framework/node_def_builder.h"
    #include "tensorflow/core/framework/op.h"
    #include "tensorflow/core/framework/tensor_shape.h"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 25 19:54:38 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

    #include "tensorflow/compiler/tf2xla/xla_context.h"
    #include "tensorflow/compiler/tf2xla/xla_expression.h"
    #include "tensorflow/compiler/tf2xla/xla_helpers.h"
    #include "tensorflow/compiler/tf2xla/xla_op_registry.h"
    #include "xla/client/xla_builder.h"
    #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h"
    #include "tensorflow/core/common_runtime/device.h"
    #include "tensorflow/core/common_runtime/device_factory.h"
    #include "tensorflow/core/common_runtime/device_mgr.h"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

        output_values.push_back(expr->AsXlaOp(&xla_builder_));
      }
    
      absl::Span<const xla::XlaOp> return_values(output_values);
      xla::XlaOp root_value = xla::Tuple(&xla_builder_, return_values);
    
      TF_ASSIGN_OR_RETURN(XlaComputation computation,
                          xla_builder_.Build(root_value,
                                             /*remove_dynamic_dimensions=*/false));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.h

                        mlir::ModuleOp module);
    
    // Lower TF to MHLO and insert HLO into the XlaBuilder. xla_params are HLO-level
    // inputs to module_op that have already been added to the XlaBuilder. returns
    // are the returned XlaOps.
    ABSL_DEPRECATED("Use v2/legalize_tf.h::LegalizeMlirToHlo instead.")
    Status BuildHloFromTf(mlir::ModuleOp module_op, xla::XlaBuilder& builder,
                          llvm::ArrayRef<xla::XlaOp> xla_params,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/tf_xla_mlir_translate.cc

      TF_RETURN_IF_ERROR(RefineShapes(arg_shapes, module_op));
    
      mlir::func::FuncOp main = module_op.lookupSymbol<mlir::func::FuncOp>("main");
      mlir::Block& block = main.getRegion().front();
      xla::XlaBuilder builder("main");
    
      // Create xla_params.
      std::vector<xla::XlaOp> xla_params;
      for (mlir::BlockArgument& arg : block.getArguments()) {
        auto num = arg.getArgNumber();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/legalize_tf_to_hlo.h

    #include "tsl/platform/statusor.h"
    
    namespace tensorflow {
    namespace tf2xla {
    namespace internal {
    
    // Legalize the given MLIR module to XLA HLO using a combination of the MLIR
    // Bridge and XlaBuilder
    absl::StatusOr<XlaCompilationResult> LegalizeTfToHlo(
        const tpu::MlirToHloArgs& computation,
        const tpu::TPUCompileMetadataProto& metadata, bool use_tuple_args,
        llvm::StringRef device_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 20:29:34 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/api/v2/legalize_tf.cc

          compilation_result.get());
    
      if (combined_bridge_status.ok()) {
        VLOG(1) << "Successfully compiled MLIR computation to XLA HLO using "
                   "Combined MLIR and XlaBuilder Bridge.";
    
        DumpHloCompilationResult("legalize_tf_combined_bridge.hlo",
                                 compilation_result.get())
            .IgnoreError();
        return *compilation_result;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 00:40:46 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

      tensorflow::OkOrSetErrorCounterPayload(
          tensorflow::core::platform::ErrorSourceProto::MLIR_BRIDGE_PHASE_2,
          status);
      return status;
    }
    
    Status BuildHloFromTfInner(mlir::ModuleOp module_op, xla::XlaBuilder& builder,
                               llvm::ArrayRef<xla::XlaOp> xla_params,
                               std::vector<xla::XlaOp>& returns,
                               llvm::StringRef device_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
Back to top