Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for Deallocator (0.23 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_buffer.h

    typedef struct TF_Buffer {
      const void* data;
      size_t length;
      void (*data_deallocator)(void* data, size_t length);
    } TF_Buffer;
    
    // Makes a copy of the input and sets an appropriate deallocator.  Useful for
    // passing in read-only, input protobufs.
    TF_CAPI_EXPORT extern TF_Buffer* TF_NewBufferFromString(const void* proto,
                                                            size_t proto_len);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 27 21:07:00 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. tensorflow/c/eager/custom_device_testutil.cc

      auto dtype = TFE_TensorHandleDataType(t->tensor);
      TFE_CustomDeviceTensorHandleMethods handle_methods;
      handle_methods.num_dims = &LoggedTensorNumDims;
      handle_methods.dim = &LoggedTensorDim;
      handle_methods.deallocator = &LoggedTensorDeallocator;
      return TFE_NewCustomDeviceTensorHandle(context, logging_device_name.c_str(),
                                             dtype, t.release(), handle_methods,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 03 20:47:31 UTC 2021
    - 8.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/allocator.go

    var AllocatorPool = sync.Pool{
    	New: func() interface{} {
    		return &Allocator{}
    	},
    }
    
    // Allocator knows how to allocate memory
    // It exists to make the cost of object serialization cheaper.
    // In some cases, it allows for allocating memory only once and then reusing it.
    // This approach puts less load on GC and leads to less fragmented memory in general.
    type Allocator struct {
    	buf []byte
    }
    
    var _ MemoryAllocator = &Allocator{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 03:17:50 UTC 2022
    - 2.2K 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/storage/storage_test.go

    	"k8s.io/kubernetes/pkg/registry/core/service/allocator"
    	allocatorstore "k8s.io/kubernetes/pkg/registry/core/service/allocator/storage"
    	"k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
    	"k8s.io/kubernetes/pkg/registry/registrytest"
    	netutils "k8s.io/utils/net"
    )
    
    func newStorage(t *testing.T) (*etcd3testing.EtcdTestServer, ipallocator.Interface, allocator.Interface, storage.Interface, factory.DestroyFunc) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/device_context_test.cc

        tensorflow::AllocatorAttributes host_alloc_attr;
        host_alloc_attr.set_on_host(true);
        host_allocator_ = device_->GetAllocator(host_alloc_attr);
    
        tensorflow::AllocatorAttributes device_alloc_attr;
        device_alloc_attr.set_on_host(false);
        device_allocator_ = device_->GetAllocator(device_alloc_attr);
    
        tensorflow::DeviceContext* device_context;
        auto status = device_->TryGetDeviceContext(&device_context);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  9. 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)
  10. src/cmd/compile/internal/ssa/_gen/allocators.go

    		fmt.Printf("%s\n", w.Bytes())
    		panic(err)
    	}
    
    	if err := os.WriteFile("../allocators.go", b, 0666); err != nil {
    		log.Fatalf("can't write output: %v\n", err)
    	}
    }
    func genAllocator(w io.Writer, a allocator) {
    	fmt.Fprintf(w, "var poolFree%s [%d]sync.Pool\n", a.name, a.maxLog-a.minLog)
    	fmt.Fprintf(w, "func (c *Cache) alloc%s(n int) %s {\n", a.name, a.typ)
    	fmt.Fprintf(w, "var s %s\n", a.typ)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 6.7K bytes
    - Viewed (0)
Back to top