Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for cpu_allocator (0.12 sec)

  1. tensorflow/c/c_api_test.cc

      TF_DeleteStatus(s);
    }
    
    void Deallocator(void* data, size_t, void* arg) {
      tensorflow::cpu_allocator()->DeallocateRaw(data);
      *reinterpret_cast<bool*>(arg) = true;
    }
    
    TEST(CAPI, Tensor) {
      const int num_bytes = 6 * sizeof(float);
      float* values =
          reinterpret_cast<float*>(tensorflow::cpu_allocator()->AllocateRaw(
              TF_TensorDefaultAlignment(), num_bytes));
      int64_t dims[] = {2, 3};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
  2. tensorflow/c/kernels_test.cc

    }
    #undef EXPECT_TF_SIZE
    
    class DummyDevice : public DeviceBase {
     public:
      explicit DummyDevice(Env* env) : DeviceBase(env) {}
      Allocator* GetAllocator(AllocatorAttributes /*attr*/) override {
        return cpu_allocator();
      }
    };
    
    TEST(TestKernel, TestInputAndOutputCount) {
      const char* node_name = "InputOutputCounterKernel";
      const char* op_name = "BarOp";
      const char* device_name = "FakeDeviceName2";
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 50.4K bytes
    - Viewed (0)
Back to top