Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for Memcpy (0.09 sec)

  1. tensorflow/c/eager/c_api_distributed_test.cc

      ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
      TFE_DeleteTensorHandle(retvals[0]);
      float sum = 0;
      EXPECT_EQ(sizeof(sum), TF_TensorByteSize(t));
      memcpy(&sum, TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
      EXPECT_EQ(sum, 6.0);
    
      TFE_DeleteTensorHandle(h0);
      TFE_DeleteTensorHandle(h1);
      TFE_DeleteTensorHandle(h2);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 15 09:49:45 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/stream_executor/stream_executor.cc

        stream_executor_->memset32(&device_, stream_handle, &device_mem, pattern,
                                   size, c_status.get());
        return StatusFromTF_Status(c_status.get());
      }
      absl::Status Memcpy(Stream* stream, void* host_dst,
                          const DeviceMemoryBase& gpu_src, uint64 size) override {
        OwnedTFStatus c_status(TF_NewStatus());
        SP_Stream stream_handle = static_cast<CStream*>(stream)->Handle();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 14 07:39:19 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.h

                                        clamp_max_double_);
    
        uint64_t signless_result;
        if (is_signed_) {
          int64_t clamped_int = static_cast<int8_t>(clamped);
          memcpy(&signless_result, &clamped_int, sizeof(clamped_int));
        } else {
          signless_result = static_cast<uint8_t>(clamped);
        }
        return APInt(storage_bit_width_, signless_result);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. tensorflow/c/tf_tensor.cc

        buf = new TF_ManagedBuffer(tensorflow::allocate_tensor("TF_NewTensor", len),
                                   len, tensorflow::deallocate_buffer, nullptr,
                                   /*owns_memory=*/true);
        std::memcpy(buf->data(), data, len);
        // Free the original buffer.
        deallocator(data, len, deallocator_arg);
      } else {
        buf = new TF_ManagedBuffer(data, len, deallocator, deallocator_arg,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. tensorflow/c/kernels.cc

      absl::Status s = cc_ctx->GetAttr(attr_name, &v);
      ::tensorflow::Set_TF_Status_from_Status(status, s);
    
      if (!status->status.ok()) return;
    
      if (max_length <= 0) {
        return;
      }
      std::memcpy(value, v.data(), std::min<size_t>(v.length(), max_length));
    }
    
    void TF_OpKernelConstruction_GetAttrStringList(TF_OpKernelConstruction* ctx,
                                                   const char* attr_name,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 36K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/partially_decluster_pass.cc

          // Check if `dst` is in a different cluster, unclustered, or about to be
          // partially declustered (here we rely on the post-order traversal order).
          // If yes, decluster `n` to avoid the device-to-host memcpy.
          std::optional<absl::string_view> dst_cluster =
              result->count(dst) ? std::nullopt : GetXlaClusterForNode(*dst);
          if (from_cluster != dst_cluster) {
            CHECK(result->insert(n).second);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/test.go

    		X))
    }
    
    // issue 30065
    
    func test30065(t *testing.T) {
    	var a [256]byte
    	b := []byte("a")
    	C.memcpy(unsafe.Pointer(&a), unsafe.Pointer(&b[0]), 1)
    	if a[0] != 'a' {
    		t.Errorf("&a failed: got %c, want %c", a[0], 'a')
    	}
    
    	b = []byte("b")
    	C.memcpy(unsafe.Pointer(&a[0]), unsafe.Pointer(&b[0]), 1)
    	if a[0] != 'b' {
    		t.Errorf("&a[0] failed: got %c, want %c", a[0], 'b')
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  8. tensorflow/c/c_api.cc

      status->status = s->session->PRunSetup(input_names, output_names,
                                             target_oper_names, &new_handle);
      if (status->status.ok()) {
        char* buf = new char[new_handle.size() + 1];
        memcpy(buf, new_handle.c_str(), new_handle.size() + 1);
        *handle = buf;
      }
    }
    
    void TF_PRun(TF_DeprecatedSession* s, const char* handle,
                 // Input tensors
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc

          TF_RETURN_IF_ERROR(
              tensorflow::XLAShapeToTensorShape(xla_literal->shape(), &shape));
          tensorflow::Tensor tensor(data_type, shape);
          std::memcpy(static_cast<char*>(tensor.data()),
                      xla_literal->untyped_data(),
                      xla::ShapeUtil::ByteSizeOfPrimitiveType(
                          xla_literal->shape().element_type()) *
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 01:03:21 UTC 2024
    - 35.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

        auto status = absl::OkStatus();
    
        std::vector<uint8_t> custom_options;
    
        if (IsValidBufferOffset(op.large_custom_options_offset)) {
          custom_options.resize(op.large_custom_options_size);
          memcpy(custom_options.data(),
                 reinterpret_cast<const uint8_t*>(model_ptr->allocation()->base()) +
                     op.large_custom_options_offset,
                 op.large_custom_options_size);
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
Back to top