Commit Graph
59 Commits
Author SHA1 Message Date
Eddy Kim 35dafce513 [GPU] move convert after gather to reduce memory usage (#21616) 2023-12-18 13:34:46 +04:00
Eddy Kim e109f735dc [GPU] faster model caching (#21479)
* faster large data loading by double buffering

* added get_allocating_order() that is cached for faster loading

* added offset usm memory copy tests

* removed negative_same_names_within_different_networks_cache

* replaced get_processing_order() with processing_order
2023-12-16 04:50:58 -08:00
Eddy Kim 3e2c2c06af [GPU] cldnn::program serialization (#21290)
* cldnn::program serialization

* fixed to set a stream in a outputbuffer

* removed unnecessary comments

* replaced emplace_back with push_back

* updated bool vector serializer

* fixed several bugs

* removed m_model from compiled_model

* fixed streams_test for model caching

* updated mutable_data handling logic

* added a new API SetUpdateDispatchDataFunc

* updated to serialize weights_reorder_param

* added functional tests for dynamic model caching

* renamed to GetUpdateDispatchDataFunc

* added dynamic model caching tests
2023-11-30 20:16:51 -08:00
Eddy Kim 6fa4f9fd78 [GPU] fixed to create Graphs with different stream_ids (#20626)
* fixed to create Graphs with different stream_ids

* added num_streams config for auto batch test
2023-10-24 20:26:36 -07:00
Eddy Kim 0194cdce3b [GPU] updated to add reorder after parameter when it is connected to quantize (#19182)
* updated to add reorder after parameter when it is connected to quantize

* removed redundant code
2023-08-14 23:29:49 -07:00
Eddy Kim 9deef1480a updated to init onednn attr (#19055) 2023-08-10 07:38:32 +00:00
Eddy Kim d278ff5786 [GPU] updated to enqueue only fully_connected layers for async build (#18891)
* updated to enqueue only fc for async build

* updated use_async_compilation(), make_task_executor_config() and disabled gemm_onednn.impl_replacement_with_cldnn

* added _num_async_build_threads

* added gemm to the async compliation targets
2023-08-08 09:27:35 +09:00
Eddy Kim 9e9cf72973 updated to reset variable memory when shape is changed (#18941) 2023-08-02 11:24:58 -07:00
Eddy Kim 1fd598c303 onednn-gpu update to fix caching issue (#18935) 2023-08-02 11:14:30 -07:00
Eddy Kim 2c73916093 [GPU] fix compilation context to use kernel_impl_params as key (#18470)
* fixed aompilation context to use kernel_impl_params for key

* fixed the argument for push_task
2023-07-17 00:48:12 -07:00
Eddy Kim 42d44ddc84 updated not to propagate events when in-order queue is used (#18415) 2023-07-06 19:57:12 -07:00
Eddy Kim 58d1fc3c6b [GPU] updates to use a graph local net_id for model caching (#18372)
* newly added local_net_id

* updated calls to network ctors

* updated to use uint32_t for local_net_id

* added comments for _local_net_id
2023-07-06 18:34:08 -07:00
Eddy Kim 4c072ac4b5 [GPU] memory reuse for dynamic models (#18228)
* enable memory reuse for dynamic models

* updated to return dependant events for the shape_of primitive

* fixed memory_pool.release_memory()

* fixed a lint error

* fixed missing default value

* updated to use reset flag for dynamic models

* changed to use is_dynamic_output_layout instead of is_dynamic

* updated to use get_internal_params instread of buffer_ptr

* added a memory reuse test for dynamic models
2023-07-04 18:12:49 -07:00
Eddy Kim ef041565a8 [GPU] primitive serialization (#17670)
* primitive serialization

* updated primitive::desc() to use impl_param instead of program_node

* added hash caching unit tests

* added missed calls to save and load of parent

* updated copyright year
2023-05-25 18:31:32 -07:00
Eddy Kim 7c84a586f9 [GPU] Fixed deserialization logic for dynamic batch (#17486)
* deserialization of dynamic batch

* updated multi stream tests

* added unit tests

* updated cache dir name

* resolved type conversion warning

* removed teardown()

* added const
2023-05-18 15:40:04 -07:00
Eddy Kim 2120e5ffe3 [GPU] enables ImportNetwork with remote_context API (#17482)
* enabled two ImportNetwork APIs

* removed unnecessary import_network impl

* added unit tests

* added include file_utils.hpp
2023-05-17 11:21:38 -07:00
Eddy Kim e7d94ba020 [GPU] fix adaptive pooling kernel (#17429)
* fixed not to use ceil

* added an unit test
2023-05-09 23:56:43 -07:00
Eddy Kim 634c58903d [GPU] fix gen9_common_conv_fwd_data_f32 kernel to support op fusion when #input_channel == 3 (#17318)
* added op fusion code

* fixed typo

* added unit tests

* size reduction
2023-05-07 20:54:03 -07:00
Eddy Kim 09265083ed [GPU] fixed a missing data type (#17200)
* fixed missing data type

* updated the resolution for better accuracy check
2023-04-26 08:28:18 +00:00
Eddy Kim d972a71b4c [GPU] Fixed the prepare_quantization pass to support grouped_weights_shape (#17093)
* fixed to support grouped_weights_shape

* added grouped_weights unit tests
2023-04-24 14:21:50 -07:00
Eddy Kim fab8236af3 [GPU] Fixed OneDNN fc+sum fusion serialization (#16988)
* fixed onednn fc+sum fusion serialization

* removed the white list for sum post op fusion

* added deconv fusing caching tests
2023-04-19 09:43:27 -07:00
Eddy Kim 9b9c31d46b [GPU] Updated to allocate memory in order of size while deserializing (#16867)
* updated to allocate memory in order of size while deserializing

* fix windows build error

* updated to check dependencies between not connected nodes
2023-04-16 22:33:57 -07:00
Eddy Kim f6ee6e92f8 [GPU] fixed loop serialization logic for multi-stream execution (#16838)
* fixed loop serialization logic for multi-stream execution

* fixed the multistream unit test
2023-04-11 12:40:37 +04:00
Eddy Kim 07437eec1e updated to store dims and data type for binary post ops (#16792) 2023-04-06 20:13:53 -07:00
Eddy Kim df4d7bd3e9 fix uninitialized scalar variables (#16772) 2023-04-06 17:28:45 -07:00
Eddy Kim 90615cf26a [GPU] Fix OneDNN primitive attr serialization logic (#16654)
* fix onednn primitive attr serialization logic

* added an onednn fc fusing serialization test

* added gemm fusing serialization tests
2023-04-03 18:24:40 -07:00
Eddy Kim e169c7cd38 fix a bug in permute_bfzyx_to_bfyxz (#16599) 2023-03-28 18:19:35 +00:00
Eddy Kim e348481849 [GPU] Transformed IR serialization for dynamic models (#16169)
* IR serialization for dynamic models

* added ShapeOf1To3 transformation pass

* fixed input output type mismatch

* removed unnecessary codes

* moved ConvertShapeOf1To3 from common to GPU plugin

* updated copyright year

* fixed build errors
2023-03-14 11:03:02 -07:00
Eddy Kim d2a5be0ab8 enabled exec_graph and pc in deserialized model (#15975) 2023-02-27 10:14:04 -08:00
Eddy Kim 30939f5021 updated to share constant data memories across multiple streams (#15915) 2023-02-24 14:26:10 -08:00
Eddy Kim f562e96305 [GPU] Fallback to kernel caching in the case of dynamic models (#15842)
* use kernel caching for dynamic models

* replaced cl_cache with blob

* updated to serialize dims info of input and output

* updated to skip unicode tests in Windows
2023-02-23 22:05:16 -08:00
Eddy Kim a6ff809ad7 [GPU] Model caching unit tests (#15413)
* gpu model caching unit tests

* added serialization unit tests

* added save and load for quantize primitive_inst

* reduced the range of inputs for Gemm tests

* updated the copyright year
2023-02-22 05:53:43 +00:00
Eddy Kim c0888b45da [GPU] Serialization of the primitive class (#15335)
* serialization of proposal

* serialization of anchors in proposal

* added unit tests for gpu proposal

* updated the proposal primitive to be partially serialized

* serialization of primitive class

* removed unnecessary codes

* removed white spaces

* serialization of loop primitive

* serialization of nms

* fixed implicit concat logic in serialization

* added RUN_ALL_MODEL_CACHING_TESTS directive

* fixed an error related with specialization of boolean vector
2023-02-13 05:34:35 +01:00
Eddy Kim 8e84531b58 [GPU] Serialization of read_value and assign (#15007)
* serialization of read_value and assign primitives

* lines should be <= 160 characters long

* added unit tests for read_value and assign

* updated to store is_output_evnet in primitive_inst

* removing _is_output_event in typed_primitive_impl_ocl

* added comments for mem_allocated and is_output_null
2023-02-06 11:10:59 -08:00
Eddy Kimandhyunback c2518f1e4a [GPU] Serialization logic updates for OneDNN 3.0 (#15182)
* [GPU] The draft for integration oneDNN3.0

Initial PR.

1. Support oneDNN3.0 API
2. Use binary_mul post_opt instead of oscale channel-wise mask(2)
3. Disable some post-opt fusing because of no eltwise scale API
    eltw(non_linear)+eltw(linear), eltw+sum+eltw(linear)

Signed-off-by: hyunback <hyunback.kim@intel.com>

* Fix hardwish issue in 3.0

hard coded hardswish parameter(2.7) is changed alpha and beta from user's required input.

Signed-off-by: hyunback <hyunback.kim@intel.com>

* clean up code

Signed-off-by: hyunback <hyunback.kim@intel.com>

* Apply code review comment and fix ci issue

Signed-off-by: hyunback <hyunback.kim@intel.com>

* Remove setting dst scale

- ACC issue
- No perf gain compared binary_mul

Signed-off-by: hyunback <hyunback.kim@intel.com>

* gpu serialization for onednn 3.0

* missed changes

* add onednn engine creator when loading model from cache

* fixed to use mem_dep index

* updated to save zero_point_mask for serialization

* fixed onednn fc serialization logic

* updated the logic to check if onednn is enabled

---------

Signed-off-by: hyunback <hyunback.kim@intel.com>
Co-authored-by: hyunback <hyunback.kim@intel.com>
2023-01-30 09:41:25 -08:00
Eddy Kim 3ace063040 [GPU] Adding copy functions for image2d memory (#15330)
* implemented copy functions for image2d

* updated to dump data using copy_to without lock

* calculating _bytes_count for image2d
2023-01-27 16:47:47 -08:00
Eddy Kim 14a7e443d0 Adding missed conversion logics between layout and string (#15103)
* added missed layout to string conversion

* added an unit test for layout_from_string

* added missing spaces around =

* replaced 95 with SCALAR

* moved layout_to_string into a new file

* changed to parametrized test
2023-01-16 17:32:30 +04:00
Eddy Kim 879a7de889 Update calculateFileInfo for the null string case (#15064)
* updated not to find absPath for null filePath

* changed to cache only std::runtime_error

* fix clang-format error
2023-01-13 17:47:25 +04:00
Eddy Kim 534905fd2d ImportNetworkThrows case is removed (#15000) 2023-01-11 20:25:42 -08:00
Eddy Kim 0ce82204bb [GPU] Serialization of loop primitive (#14703) 2022-12-26 13:28:55 +04:00
Eddy Kim b46dd308d6 [GPU] Updated to get lockable memories for device inputs in prepare_input() (#14418)
* updated to get ockable memory for device inputs

* gpuFuncTest to set f64 scalar tensor

* aligned type names

* updated to get lockable memory for some specific precisions

* add a function to get a supported precision
2022-12-16 09:12:47 +04:00
Eddy Kim cb15d281f1 [GPU] Serialize GPU memory reuse flag (#14269)
* serialize gpu memory reuse flag

* added c-tor of reduce_impl

* renamed memory_reuse_by_user as can_reuse_memory, and modified memory allocation logic to be simpler
2022-11-29 22:13:00 +03:00
Eddy Kim d436206019 [GPU] Removing OneDNN patch file for GPU model caching (#14214)
* updated not to use default c-tor for onednn desc

* onednn patch file is removed
2022-11-25 11:37:30 +04:00
Eddy Kim 36e37a8b0a [GPU] GPU driver version and architecture properties (#14187)
* added gpu driver version and gpu architecture properties

* deleted unnecessary header inclusion

* reverted to use gfx_ver for architecture string

* device_id is added to caching_properties
2022-11-25 09:20:15 +04:00
Eddy Kim ae0b2ce3c3 [GPU] GPU serialization fix (#14164)
* kernel_impl_params should be serialized before primitive_impl

* reduced the range of min max values ​​for this test case

* updated to use default get_mem when min max are not specified
2022-11-23 12:00:22 +04:00
Eddy Kim 0b1e36600b [GPU] Graph serialization for GPU #2 (#13986)
* moved serialization include path

* quiet onednn-gpu patching

* save and load kernels in _impls

* changed to use OPENVINO_ASSERT

* fix errata

* updated to follow OpenVINO naming convention

* updated error messages

* binary buffer by vector<uint8_t>

* partial_shape serialization

* removed object_type

* added a new storage class for primitive_type_string and id

* updated to throw an exception when _node is null in build_deps().

* removed redundant memory_pool clearing

* added a new net_id creator

* newline at eof

* updated CLDNN with GPU

* added cache blob descriptions

* updated output allocation logic  in serialization

* added ov::device::architecture in supported properties

* overrided save and load in data_inst and mutable_data_inst

* removed save and load functions in mutable_data

* baseline for serialization unit tests

* added serialization unit tests

* added serialization unit tests

* updated not to execute build_deps when deserialized

* make_data without namespace

* updated to use default layout c-tor

* updated get_unique_net_id()

* updated get_type_id() to a pure virtual method

* updated ov::caching_properties

* added [GPU] tags

* updated network c-tor

* updated unit tests
2022-11-22 12:43:50 +03:00
Eddy Kim 8a2b1c9cf9 updated memory accessor (#14020) 2022-11-16 14:07:26 +03:00
Eddy Kim f488e6cc49 [GPU] Graph serialization for GPU (#13801)
* gpu graph serialization

* fix to rebase

* onednn_gpu.patch for serialization

* git apply --verbode to --quiet

* functional tests

* removed referece of mas_unpooling.hpp

* git apply --verbose

* add no args ctor for proposal_impl

* changed kernel_cache save/load error messages

* gpu model cacning control env. variable

* fixed nonnull warning

* impl_params are added to save and load

* changed a way to use kernel_impl_params in save and load

* get_arguments_by_idx is added

* setenv is disabled in windows

* added missed part for onednn

* code refactoring based on code review

* fixed to use get_node_output_layout()

* OV_GPU_MODEL_CACHING is changed to OV_GPU_CACHE_MODEL

* reference to node and primitive are removed

* fixed hash of enum class

* restored CanShareContextWith

* serialization of intermediate memory

* fix to rebase

* multiclass_nms serialization

* caching_properties added
2022-11-13 16:39:45 -08:00
Eddy Kim e55e987456 [GPU] copying required information at inference time to primitive_inst and kernel_impl_params (#13733)
* usage of program and program_node are changed to use kernerl_impl_params

* pointer to network is replaced with reference

* moved primitive specific parameters out of kernel_impl_params

* use impl_params instead of program_node in onednn_impl

* relocate params from impl_params to primitive_inst

* added conditional directives around fused_desc_onednn

* removal of unnecessary changes

* node_output is separated from impl_param->output
2022-11-01 09:45:57 -07:00
Eddy Kim daec2605e4 [GPU] changing references to pointers for GPU graph serialization (#13559)
* cldnn serialization

* read layout from _impl_param instead of node

* changed ref in kernel_impl_param to pointer

* removed serialization utils

* removed serialzation related changes

* restored references in function arguments

* remove trailing spaces

* revert change in bs_x_bsv16

* fix to rebase
2022-10-29 04:39:51 +03:00
Eddy Kim 0053ed1a65 updated to convert b_fs_yx_fsv16 to o_is_yx_isv16 (#12630) 2022-08-22 14:22:17 +09:00
Eddy Kim b9457b3a31 [GPU] Get rid program_node reference from all primitive_impl classes (#12211)
* removed references to program_node

* removed member variables in primitive_impl

* removed redundant variables

* removed whithspace at the end of line

* added ctor for updated primitive_impls

* changed init_kernels to require kernels_cache

* removed program_node ref from custom_primitive

* added set_node_params to update the lastest status of program_node

* removed const from get_kernel
2022-08-11 14:14:21 +04:00
Eddy Kim dc7efafd7c Revert "[GPU] Pass activation unit tests on DG2 (#11969)" (#12167)
This reverts commit 3334e8933c.
2022-07-15 12:58:09 +03:00
Eddy Kim 73381e976e updated to fuse activation in eltwise_vload8 (#12084) 2022-07-08 12:15:10 +00:00
Eddy Kim 8d852b4aee fixed 'is_rotating_except_batch' to follow the IE order (#12050) 2022-07-08 15:36:17 +09:00
Eddy Kim 3961a241cd Revert "Disable fc_int8_inputs_fused_fp32_sum (#11709)" (#11863) 2022-06-13 13:25:59 +09:00
Eddy Kim 3a5805fce0 quick fix in tests (#11812) 2022-06-07 15:22:39 +00:00
Eddy Kim 04b69af0f5 [GPU] Support for PReLU with multiple dims slope tensor for GPU (#11782)
* reshape a slope tensor of channel-wise prelu

* changed to follow prelu spec

* added unittests for prelu with multiple dims slope

* Update constant.cpp

Blanks are added.

* added comments about PReLU slope reshape policy

* added int8 prelu fusion tests
2022-06-02 23:01:01 +09:00
Eddy Kim 200026f28b Missing backslashes right after mo (#11216) 2022-03-25 13:39:33 +03:00