Home
last modified time | relevance | path

Searched refs:ResourceHandle (Results 1 – 25 of 103) sorted by relevance

12345

/external/tensorflow/tensorflow/core/framework/
Dresource_handle.cc50 /* static */ constexpr const char* ResourceHandle::ANONYMOUS_NAME;
52 ResourceHandle::ResourceHandle() {} in ResourceHandle() function in tensorflow::ResourceHandle
54 ResourceHandle::ResourceHandle(const ResourceHandleProto& proto) { in ResourceHandle() function in tensorflow::ResourceHandle
58 Status ResourceHandle::BuildResourceHandle(const ResourceHandleProto& proto, in BuildResourceHandle()
59 ResourceHandle* out) { in BuildResourceHandle()
66 ResourceHandle::~ResourceHandle() {} in ~ResourceHandle()
68 void ResourceHandle::AsProto(ResourceHandleProto* proto) const { in AsProto()
81 Status ResourceHandle::FromProto(const ResourceHandleProto& proto) { in FromProto()
102 string ResourceHandle::SerializeAsString() const { in SerializeAsString()
108 bool ResourceHandle::ParseFromString(const string& s) { in ParseFromString()
[all …]
Dresource_handle.h43 class ResourceHandle {
45 ResourceHandle();
46 ResourceHandle(const ResourceHandleProto& proto);
47 ~ResourceHandle();
52 ResourceHandle* out);
136 static ResourceHandle MakeRefCountingHandle(
144 static ResourceHandle MakeRefCountingHandle(
193 std::string ProtoDebugString(const ResourceHandle& handle);
196 void EncodeResourceHandleList(const ResourceHandle* p, int64_t n,
201 ResourceHandle* ps, int64_t n);
Dresource_mgr.h121 ResourceHandle MakeResourceHandle(
194 Status Lookup(const ResourceHandle& handle,
229 Status Delete(const ResourceHandle& handle) TF_MUST_USE_RESULT;
330 ResourceHandle MakeResourceHandle(
338 ResourceHandle MakeResourceHandle(
350 ResourceHandle MakeResourceHandle(
368 const ResourceHandle& HandleFromInput(OpKernelContext* ctx, int input);
370 ResourceHandle* handle);
377 Status CreateResource(OpKernelContext* ctx, const ResourceHandle& p, T* value);
384 Status LookupResource(OpKernelContext* ctx, const ResourceHandle& p, T** value);
[all …]
Dresource_mgr.cc33 ResourceHandle MakeResourceHandle( in MakeResourceHandle()
38 ResourceHandle result; in MakeResourceHandle()
42 if (name == ResourceHandle::ANONYMOUS_NAME) { in MakeResourceHandle()
44 strings::StrCat("_AnonymousVar", ResourceHandle::GenerateUniqueId())); in MakeResourceHandle()
60 handle->scalar<ResourceHandle>()() = in MakeResourceHandleToOutput()
67 Status ValidateDevice(OpKernelContext* ctx, const ResourceHandle& p) { in ValidateDevice()
226 Status ResourceMgr::Lookup(const ResourceHandle& handle, in Lookup()
306 Status ResourceMgr::Delete(const ResourceHandle& handle) { in Delete()
383 const ResourceHandle& HandleFromInput(OpKernelContext* ctx, int input) { in HandleFromInput()
384 return ctx->input(input).flat<ResourceHandle>()(0); in HandleFromInput()
[all …]
Dtyped_allocator.h98 inline void TypedAllocator::RunCtor(Allocator* raw_allocator, ResourceHandle* p, in RunCtor()
101 for (size_t i = 0; i < n; ++p, ++i) new (p) ResourceHandle(); in RunCtor()
107 inline void TypedAllocator::RunDtor(Allocator* raw_allocator, ResourceHandle* p, in RunDtor()
110 for (size_t i = 0; i < n; ++p, ++i) p->~ResourceHandle(); in RunDtor()
Dtensor.cc242 struct Helper<ResourceHandle> {
250 EncodeResourceHandleList(in->base<const ResourceHandle>(), n, in Encode()
259 auto* buf = new Buffer<ResourceHandle>(a, n); in Decode()
260 ResourceHandle* ps = buf->template base<ResourceHandle>(); in Decode()
272 return n * sizeof(ResourceHandle); in TotalBytes()
377 struct ProtoHelper<ResourceHandle> {
385 static void Fill(const ResourceHandle* data, size_t n, TensorProto* proto) { in Fill()
551 TensorBuffer* FromProtoField<ResourceHandle>(Allocator* a, in FromProtoField()
554 Buffer<ResourceHandle>* buf = new Buffer<ResourceHandle>(a, n); in FromProtoField()
555 ResourceHandle* data = buf->template base<ResourceHandle>(); in FromProtoField()
[all …]
Dresource_handle_test.cc54 ResourceHandle::MakeRefCountingHandle(resource, "cpu", {}, {}); in TEST_F()
80 auto handle = std::make_unique<ResourceHandle>(proto); in TEST_F()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_op_interfaces.h64 return name == ::tensorflow::ResourceHandle::ANONYMOUS_NAME; in IsResourceHandleAnonymous()
72 struct ResourceHandle { struct
73 ResourceHandle(StringRef container, StringRef name, StringRef device, in ResourceHandle() function
77 bool operator==(const ResourceHandle& rhs) const {
83 friend ::llvm::hash_code hash_value(const ResourceHandle& resource_handle);
92 inline ::llvm::hash_code hash_value(const ResourceHandle& resource_handle) { in hash_value()
119 llvm::SmallDenseMap<ResourceHandle, int64_t>& resource_handle_id_map,
128 struct DenseMapInfo<mlir::TF::ResourceHandle> {
129 static mlir::TF::ResourceHandle getEmptyKey() {
134 static mlir::TF::ResourceHandle getTombstoneKey() {
[all …]
Dtf_op_interfaces.cc32 llvm::SmallDenseMap<ResourceHandle, int64_t> &resource_handle_id_map, in GetResourceHandleValueAndIdBase() argument
37 ResourceHandle handle(container, shared_name, device, /*op=*/nullptr); in GetResourceHandleValueAndIdBase()
/external/tensorflow/tensorflow/core/kernels/
Dresource_ops_test.cc62 handle_tensor.scalar<ResourceHandle>()() = in Compute()
63 ResourceHandle::MakeRefCountingHandle(new MockResource(alive, payload), in Compute()
104 ResourceHandle& output_handle = output->scalar<ResourceHandle>()(); in TEST_F()
145 Name("MockCopyOp").Device(DEVICE_CPU).TypeConstraint<ResourceHandle>("T"),
146 MockCopyOpKernel<ResourceHandle>);
158 bool is_equal_handles(const ResourceHandle& a, const ResourceHandle& b) { in is_equal_handles()
170 AddInputFromArray<ResourceHandle>( in TEST_F()
172 {ResourceHandle::MakeRefCountingHandle(new MockResource(nullptr, payload), in TEST_F()
175 EXPECT_EQ(input->scalar<ResourceHandle>()().resource()->RefCount(), 1); in TEST_F()
180 test::ExpectTensorEqual<ResourceHandle>(*output, *input, is_equal_handles); in TEST_F()
[all …]
Dconcat_lib_cpu.cc39 struct MemCpyCopier<ResourceHandle> {
40 inline void Copy(ResourceHandle* dst, const ResourceHandle* src, in Copy()
Dlookup_table_op.h98 auto h = table_.template scalar<ResourceHandle>(); in Compute()
160 table_tensor.scalar<ResourceHandle>()() = in Compute()
161 ResourceHandle::MakeRefCountingHandle<lookup::LookupInterface>( in Compute()
195 inline const ResourceHandle& SubtleMustCopyIfIntegral( in SubtleMustCopyIfIntegral()
196 const ResourceHandle& value) { in SubtleMustCopyIfIntegral()
Dstrided_slice_op.h56 struct InitOutput<ResourceHandle, NDIMS, Device> {
58 typename TTypes<ResourceHandle, NDIMS>::Tensor output) {
59 output.device(d) = output.constant(ResourceHandle());
Dlookup_ops_test.cc82 ResourceHandle& output_handle = output->scalar<ResourceHandle>()(); in TEST_F()
Dqueue_ops.cc85 const ResourceHandle& ref = context->input(0).flat<ResourceHandle>()(0); in Compute()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Dfake_session.cc151 t.scalar<tensorflow::ResourceHandle>()().set_name("var1"); in Run()
152 t.scalar<tensorflow::ResourceHandle>()().set_device(kDeviceName); in Run()
157 t.scalar<tensorflow::ResourceHandle>()().set_name("var2"); in Run()
158 t.scalar<tensorflow::ResourceHandle>()().set_device(kDeviceName); in Run()
163 t.scalar<tensorflow::ResourceHandle>()().set_name("var3"); in Run()
164 t.scalar<tensorflow::ResourceHandle>()().set_device(kDeviceName); in Run()
169 t.scalar<tensorflow::ResourceHandle>()().set_name("invalid_var"); in Run()
170 t.scalar<tensorflow::ResourceHandle>()().set_device("invalid_device"); in Run()
/external/tensorflow/tensorflow/core/util/
Dbatch_util.cc80 Status HandleElementToSlice<ResourceHandle>(const Tensor& /* element */, in HandleElementToSlice()
81 ResourceHandle* src, in HandleElementToSlice()
82 ResourceHandle* dest, in HandleElementToSlice()
115 void HandleSliceToElement<ResourceHandle>(const ResourceHandle* src, in HandleSliceToElement()
116 ResourceHandle* dest, in HandleSliceToElement()
158 void HandleSliceToElement<ResourceHandle>(Tensor* parent, ResourceHandle* src, in HandleSliceToElement()
159 ResourceHandle* dest, in HandleSliceToElement()
/external/tensorflow/tensorflow/core/data/
Ddataset_utils.h43 const string& container_name, ResourceHandle* handle) { in CreateWeakHandle()
58 Status CreateHandle(OpKernelContext* ctx, T* resource, ResourceHandle* handle) { in CreateHandle()
61 ResourceHandle::MakeRefCountingHandle(resource, ctx->device()->name()); in CreateHandle()
93 ResourceHandle handle; in Compute()
101 handle_t->scalar<ResourceHandle>()() = handle; in Compute()
232 tensor->scalar<ResourceHandle>()() = MakeResourceHandle<ResourceType>( in Compute()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/kernels/
Dtrt_engine_resource_ops_test.cc250 ResourceHandle handle = in TEST_P()
251 context_->mutable_output(0)->scalar<ResourceHandle>()(); in TEST_P()
272 AddInputFromArray<ResourceHandle>(TensorShape({}), {handle}); in TEST_P()
322 AddInputFromArray<ResourceHandle>(TensorShape({}), {handle}); in TEST_P()
350 AddInputFromArray<ResourceHandle>(TensorShape({}), {handle}); in TEST_P()
400 AddInputFromArray<ResourceHandle>(TensorShape({}), {handle}); in TEST_P()
/external/tensorflow/tensorflow/core/kernels/data/
Dshuffle_dataset_op.cc523 ResourceHandle&& resource_handle) in Dataset()
568 const ResourceHandle resource_handle_;
581 ResourceHandle&& resource_handle, bool owns_resource) in DatasetV2()
611 handle.scalar<ResourceHandle>()() = resource_handle_; in AsGraphDefInternal()
624 const ResourceHandle resource_handle_;
635 ResourceHandle&& resource_handle, bool owns_resource) in DatasetV3()
670 handle.scalar<ResourceHandle>()() = resource_handle_; in AsGraphDefInternal()
688 const ResourceHandle resource_handle_;
829 ResourceHandle&& resource_handle) in Dataset()
875 const ResourceHandle resource_handle_;
[all …]
Dcache_ops.cc88 const ResourceHandle& handle = ctx->input(0).flat<ResourceHandle>()(0); in Compute()
/external/python/setuptools/setuptools/_vendor/importlib_resources/
Dsimple.py53 class ResourceHandle(Traversable): class
95 files = (ResourceHandle(self, name) for name in self.reader.resources)
/external/python/setuptools/pkg_resources/_vendor/importlib_resources/
Dsimple.py53 class ResourceHandle(Traversable): class
95 files = (ResourceHandle(self, name) for name in self.reader.resources)
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dweights.h205 explicit TRT_TensorOrWeights(const ResourceHandle& resource);
223 ResourceHandle resource() const;
277 ResourceHandle resource_;
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dlift_variables.cc55 using ::tensorflow::ResourceHandle;
102 const ResourceHandle& resource_handle = in LiftVariablesFromSession()
103 resource_tensor.scalar<ResourceHandle>()(); in LiftVariablesFromSession()

12345