Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 83 for Deallocator (0.15 sec)

  1. tensorflow/c/tf_tensor.h

    //
    // The data will be deallocated by a subsequent call to TF_DeleteTensor via:
    //      (*deallocator)(data, len, deallocator_arg)
    // Clients must provide a custom deallocator function so they can pass in
    // memory managed by something like numpy.
    //
    // May return NULL (and invoke the deallocator) if the provided data buffer
    // (data, len) is inconsistent with a tensor of the given TF_DataType
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 06 16:40:30 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. tensorflow/c/tf_tensor.cc

      Allocator* allocator = nullptr;
      if (arg == nullptr) {
        allocator = cpu_allocator();
      } else {
        allocator = reinterpret_cast<Allocator*>(arg);
      }
      if (LogMemory::IsEnabled() && data != nullptr) {
        LogMemory::RecordRawDeallocation(
            "TensorFlow C Api", LogMemory::EXTERNAL_TENSOR_ALLOCATION_STEP_ID, data,
            allocator, false);
      }
      allocator->DeallocateRaw(data);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api.cc

        void (*deallocator)(void* data, size_t len, void* arg),
        void* deallocator_arg, TF_Status* status) {
      tensorflow::Device* device = nullptr;
      tensorflow::EagerContext* context =
          tensorflow::ContextFromInterface(tensorflow::unwrap(ctx));
      status->status = context->FindDeviceFromName(device_name, &device);
      if (!status->status.ok()) {
        deallocator(data, len, deallocator_arg);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 08:11:23 UTC 2024
    - 44K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_experimental.h

    TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandleFromDeviceMemory(
        TFE_Context* ctx, const char* device_name, TF_DataType, const int64_t* dims,
        int num_dims, void* data, size_t len,
        void (*deallocator)(void* data, size_t len, void* arg),
        void* deallocator_arg, TF_Status* status);
    
    // Retrieves the address space (i.e. job, replia, task) of the local host and
    // saves it in the buffer.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 22:37:46 UTC 2024
    - 39.5K bytes
    - Viewed (0)
  5. tensorflow/c/c_api_test.cc

      TF_TString_Init(&tstr[0]);
      TF_TString_Copy(&tstr[0], test_string, sizeof(test_string) - 1);
    
      auto deallocator = [](void* data, size_t len, void* arg) {};
      unique_tensor_ptr t_in(TF_NewTensor(TF_STRING, nullptr, 0, &tstr[0],
                                          sizeof(tstr), deallocator, nullptr),
                             TF_DeleteTensor);
    
      // Create a TF_Operation with the attribute t_in
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
  6. pkg/registry/core/service/portallocator/allocator.go

    	}
    
    	return a, err
    }
    
    // NewInMemory creates an in-memory allocator.
    func NewInMemory(pr net.PortRange) (*PortAllocator, error) {
    	return New(pr, func(max int, rangeSpec string, offset int) (allocator.Interface, error) {
    		return allocator.NewAllocationMapWithOffset(max, rangeSpec, offset), nil
    	})
    }
    
    // NewFromSnapshot allocates a PortAllocator and initializes it from a snapshot.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  7. pkg/registry/core/service/ipallocator/cidrallocator.go

    func (c *MetaAllocator) AllocateService(service *api.Service, ip net.IP) error {
    	allocator, err := c.getAllocator(ip)
    	if err != nil {
    		return err
    	}
    	return allocator.AllocateService(service, ip)
    }
    
    func (c *MetaAllocator) Allocate(ip net.IP) error {
    	allocator, err := c.getAllocator(ip)
    	if err != nil {
    		return err
    	}
    	return allocator.Allocate(ip)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_host_send_recv_device_context_test.cc

        host_alloc_attr.set_on_host(true);
        host_allocator_ = device_->GetAllocator(host_alloc_attr);
    
        AllocatorAttributes device_alloc_attr;
        device_alloc_attr.set_on_host(false);
        device_allocator_ = device_->GetAllocator(device_alloc_attr);
      }
    
     protected:
      std::unique_ptr<Device> device_;
      Allocator* host_allocator_;
      Allocator* device_allocator_;
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/xla_platform_info.cc

        // If we are on an XlaDevice, use the underlying XLA platform's allocator
        // directly. We could use the StreamExecutor's allocator which may
        // theoretically be more correct, but XLA returns a nice OOM message in a
        // Status and StreamExecutor does not.
        //
        // Importantly we can't use ctx->device()->GetAllocator() as the allocator
        // (which xla_allocator above uses) as on an XlaDevice, this is a dummy
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 17:23:27 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/xla_platform_info.h

    // Returns allocator from platform info if non-null, or populate and return a
    // pointer to the allocator adapter with allocator from context.
    //
    // This is necessary because for XLA devices the underlying TF allocator returns
    // dummy tensors.
    //
    // `stream` parameter is nullable when running on host.
    std::shared_ptr<se::DeviceMemoryAllocator> GetAllocator(
        DeviceBase* device, se::Stream* stream,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top