Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 124 for Deallocator (0.47 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_internal.h

      }
    };
    
    // Allocates tensor data buffer using specified allocator.
    // `operation` is a name for this operation.
    void* allocate_tensor(const char* operation, size_t len, Allocator* allocator);
    
    // Deallocates tensor data buffer.
    // Defaults to deallocating using CPU allocator. You can pass pointer to
    // a different Allocator as `arg`.
    void deallocate_buffer(void* data, size_t len, void* arg);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 24 20:38:55 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. pkg/registry/core/service/ipallocator/ipallocator.go

    	return len(ips)
    }
    
    // for testing, it assumes this is the allocator is unique for the ipFamily
    func (a *Allocator) Free() int {
    	return int(a.size) - a.Used()
    }
    
    // Destroy
    func (a *Allocator) Destroy() {
    }
    
    // DryRun
    func (a *Allocator) DryRun() Interface {
    	return dryRunAllocator{a}
    }
    
    // EnableMetrics
    func (a *Allocator) EnableMetrics() {
    	registerMetrics()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
  8. 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)
  9. pkg/registry/core/service/ipallocator/cidrallocator_test.go

    		allocator, err := r.getAllocator(netutils.ParseIPSloppy("10.0.0.11"))
    		if err != nil {
    			return false, nil
    		}
    		allocator.ipAddressSynced = func() bool { return true }
    		return allocator.ready.Load(), nil
    	})
    	if err != nil {
    		t.Fatal(err)
    	}
    	// allocate one IP from the new allocator
    	err = r.Allocate(netutils.ParseIPSloppy("10.0.0.11"))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  10. 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)
Back to top