Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for xla_tensor (0.18 sec)

  1. tensorflow/compiler/jit/xla_tensor.cc

    }
    
    /*static*/ se::DeviceMemoryBase XlaTensor::DeviceMemoryFromTensor(
        const Tensor& tensor) {
      const XlaTensor* xla_tensor = FromTensor(&tensor);
      if (xla_tensor) {
        CHECK(xla_tensor->has_shaped_buffer());
        return xla_tensor->shaped_buffer().root_buffer();
      } else {
        return se::DeviceMemoryBase(const_cast<char*>(tensor.tensor_data().data()),
                                    tensor.tensor_data().size());
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/xla_tensor.h

    //
    // To distinguish between "normal" device tensors and XlaTensors, the raw
    // pointer data stored in the TensorBuffer is a tagged pointer.
    class XlaTensor {
     public:
      // Downcast from a Tensor to an XlaTensor. Return nullptr if the downcast
      // fails.
      static XlaTensor* FromTensor(const Tensor* tensor);
    
      // Create a DeviceMemoryBase from a Tensor. The Tensor can be an XlaTensor, in
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_device_context.cc

      }
    
      XlaTensor* xla_tensor = XlaTensor::FromTensor(device_tensor);
      xla_tensor->WaitForDefinitionEventOnStream(device_to_host_stream.get());
    
      // Transfer manager requires the shape of the shaped buffer to be the same as
      // literal shape except for the layout.  Set the literal to use xla_tensor's
      // shape as it is derived from the cpu_tensor's shape using
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/xla_tpu_device.cc

      const tensorflow::XlaTensor* xla_tensor =
          tensorflow::XlaTensor::FromTensor(&tensor);
      if (xla_tensor == nullptr) {
        return errors::InvalidArgument(
            "Expected an XlaTensor when computing padded shape");
      }
    
      if (!xla_tensor->has_shaped_buffer()) {
        return errors::InvalidArgument(
            "XlaTensor is expected to have device memory allocated when "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/xla_launch_util.cc

            ctx->allocate_temp(output_dtype, output_shape, &output_tensor));
        if (output_tensor.TotalBytes() > 0) {
          XlaTensor* xla_tensor = XlaTensor::FromTensor(&output_tensor);
          TF_RET_CHECK(xla_tensor);
          xla_tensor->set_shaped_buffer(output.TakeSubTree({output_num}));
          if (use_multiple_streams) {
            xla_tensor->ResetDefinitionEvent(definition_event, stream);
          }
        }
        return output_tensor;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/xla_device_ops.cc

    limitations under the License.
    ==============================================================================*/
    
    #include "tensorflow/compiler/jit/xla_device_ops.h"
    
    #include <memory>
    
    #include "tensorflow/compiler/jit/xla_tensor.h"
    
    namespace tensorflow {
    
    XlaDeviceDummyOp::XlaDeviceDummyOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
    
    void XlaDeviceDummyOp::Compute(OpKernelContext* ctx) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/BUILD

        ] + if_static([
            "//tensorflow/core/common_runtime:copy_tensor",
            ":jit_compilation_passes",
        ]),
        alwayslink = 1,
    )
    
    cc_library(
        name = "xla_tensor",
        srcs = ["xla_tensor.cc"],
        hdrs = ["xla_tensor.h"],
        visibility = [":friends"],
        deps = [
            "//tensorflow/compiler/tf2xla:common",
            "//tensorflow/core:core_cpu_internal",
            "//tensorflow/core:framework",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 00:41:19 UTC 2024
    - 61.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_device_context.h

    #ifndef TENSORFLOW_COMPILER_JIT_XLA_DEVICE_CONTEXT_H_
    #define TENSORFLOW_COMPILER_JIT_XLA_DEVICE_CONTEXT_H_
    
    #include <memory>
    
    #include "absl/synchronization/mutex.h"
    #include "tensorflow/compiler/jit/xla_tensor.h"
    #include "tensorflow/compiler/tf2xla/layout_util.h"
    #include "tensorflow/compiler/tf2xla/xla_compiler.h"
    #include "xla/client/global_data.h"
    #include "xla/client/local_client.h"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/xla_device.cc

    Status DefaultPaddedShapeFn(const Tensor& tensor, xla::Shape* shape) {
      const tensorflow::XlaTensor* xla_tensor =
          tensorflow::XlaTensor::FromTensor(&tensor);
      if (xla_tensor == nullptr) {
        return TensorShapeToXLAShape(tensor.dtype(), tensor.shape(), shape);
      }
    
      const xla::ShapedBuffer& shaped_buffer = xla_tensor->shaped_buffer();
      *shape = shaped_buffer.on_device_shape();
      return absl::OkStatus();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 21:05:42 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/xla_launch_util.h

    #define TENSORFLOW_COMPILER_JIT_XLA_LAUNCH_UTIL_H_
    
    #include <map>
    #include <memory>
    #include <set>
    #include <vector>
    
    #include "tensorflow/compiler/jit/variable_info.h"
    #include "tensorflow/compiler/jit/xla_tensor.h"
    #include "tensorflow/compiler/tf2xla/xla_compiler.h"
    #include "xla/client/local_client.h"
    #include "xla/pjrt/pjrt_client.h"
    #include "xla/service/shaped_buffer.h"
    #include "xla/stream_executor/device_memory_allocator.h"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top