diff options
author | SiCong Li <sicong.li@arm.com> | 2023-06-28 09:49:45 +0100 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2023-07-25 15:48:50 +0000 |
commit | 23882a9014eb3972bca958206866c8e0d0b829cc (patch) | |
tree | 9139b91699099160e26a64abd8cf182bd7447278 /src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h | |
parent | 0a59e69fd922b02d9e3b5b043ee7f891061df7be (diff) | |
download | ComputeLibrary-23882a9014eb3972bca958206866c8e0d0b829cc.tar.gz |
Add GpuKernelArgumentBinding for runtime argument setting
* Add flexible runtime argument setting that accept argument bindings
exported from ckw.
* Introduce internal build flag ACL_INTERNAL_TEST_CKW_IN_DF. If set to
true, ckw will be tested in dynamic fusion validation tests. Otherwise
it will not be tested and the dynamic fusion will keep using
ClTemplateWriter instead.
* Fix CKW sampler for elementwise binary to deal with tile sizes > 1
in both dimensions
Resolves: COMPMID-6282
Partially resolves: COMPMID-6260
Signed-off-by: SiCong Li <sicong.li@arm.com>
Change-Id: I0ab225a4484eb2119643d900a4e72806558626ee
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9917
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Reviewed-by: Anitha Raj <Anitha.Raj@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h')
-rw-r--r-- | src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h b/src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h index a857932791..c169476a70 100644 --- a/src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h +++ b/src/dynamic_fusion/sketch/gpu/GpuWorkloadContextImpl.h @@ -36,7 +36,6 @@ namespace experimental { namespace dynamic_fusion { - /** Internal implementation of workload context. */ class GpuWorkloadContext::Impl { @@ -52,7 +51,7 @@ public: Impl(Impl &) = default; /** Assignment */ - Impl& operator=(Impl &) = default; + Impl &operator=(Impl &) = default; /** Get target GPU language. */ GpuLanguage gpu_language() const; @@ -69,27 +68,34 @@ public: */ void register_user_tensor(ITensorInfo &tensor_info); - /** Set a new ID and register the auxiliary tensor info. + /** Create a virtual (see @ref MemoryType) tensor info and save it * - * @param[in, out] tensor_info The tensor info to be registered. - * @param[in] mem_info The auxiliary tensor memory info. + * @return ITensorInfo* The created virtual tensor info object pointer */ - void register_aux_tensor(ITensorInfo &tensor_info, const AuxMemoryInfo &mem_info); - - /** Set a new ID and register the virtual tensor info. + ITensorInfo *create_virtual_tensor(); + /** Create an auxiliary (see @ref MemoryType) tensor info and save it * - * @param[in, out] tensor_info The tensor info to be registered. + * @param[in] tensor_info @ref ITensorInfo to copy from + * + * @return ITensorInfo* The created auxiliary tensor info object pointer */ - void register_virtual_tensor(ITensorInfo &tensor_info); + ITensorInfo *create_auxiliary_tensor(const ITensorInfo &tensor_info); + + /** Get tensor info created by this context, from id */ + ITensorInfo *get_tensor_info(ITensorInfo::Id id); + + /** Get tensor info created by this context, from id */ + const ITensorInfo *get_tensor_info(ITensorInfo::Id id) const; private: ITensorInfo::Id next_tensor_id(); - GpuLanguage _gpu_language; + GpuLanguage _gpu_language; CLCompileContext *_cl_compile_ctx; - ITensorInfo::Id _next_tensor_id; + ITensorInfo::Id _next_tensor_id; MemoryDescriptorMap _mem_map; + std::map<ITensorInfo::Id, std::unique_ptr<TensorInfo>> _managed_tensor_info; }; } // namespace dynamic_fusion |