forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial PR for fixing issues on existing TCs for gpufunctest (openvin…
…otoolkit#71) * Fix typo to set begin/end mask to kernel param correctly for strided_slice Signed-off-by: Andrew Park <[email protected]> * Fix exception to try resue input with empty deps and _exec_deps during creating reshape_inst Signed-off-by: Andrew Park <[email protected]> * Fix strided_slice to support static shape Signed-off-by: Andrew Park <[email protected]> * Fix input layout representation for byxf and nv12 on parameter Signed-off-by: Andrew Park <[email protected]> * Fix broadcast size check logic Signed-off-by: Andrew Park <[email protected]> * Fix layout initialization to convert tensor(cldnn format) to PartialShape(IE format) for weight reorder Signed-off-by: Andrew Park <[email protected]> * Fix kernel data conversion to convert PartialShape to ordered dims with output fortmat Signed-off-by: Andrew Park <[email protected]> * Fix not to check the new layout is identical empty tensor Signed-off-by: Andrew Park <[email protected]> * Enable cases to reorder/reshape + gemm where op is not FC Signed-off-by: Andrew Park <[email protected]> * Update AsyncInferRequest for InferRequestLegacy compatibility Signed-off-by: Andrew Park <[email protected]> * Apply PR#11073 update eltwise calc_output_layout_function and replace PartialShape::broadcast_merge_into with tensor::max Signed-off-by: Andrew Park <[email protected]> * Fix reduce calc_output_layout to apply reduce_axes correctly Signed-off-by: Andrew Park <[email protected]> * Fix scatter_update calc_output_layout to get the number of dims from dependencies correctly Signed-off-by: Andrew Park <[email protected]> * Fix gather_nd calc_output_layout to calculate the final output tensor Signed-off-by: Andrew Park <[email protected]> * Fix calc_body_input_layout to adjust cropped input shape correctly and update ==operator for layout comparison Signed-off-by: Andrew Park <[email protected]> * Fix PartialShape representation whether input rank is 2 and 3 for reshape preprocess of gemm Signed-off-by: Andrew Park <[email protected]> * Add condition to check whether input layout is dynamic or not in gather calc_output_layout Signed-off-by: Andrew Park <[email protected]> * Fix ScatterUpdate issue * Align scatter update axis format with IE Signed-off-by: Andrew Park <[email protected]> * Revert "Enable cases to reorder/reshape + gemm where op is not FC" This reverts commit 16a60b5. Signed-off-by: Andrew Park <[email protected]> * Revert "Update AsyncInferRequest for InferRequestLegacy compatibility" This reverts commit f57a7e4. Signed-off-by: Andrew Park <[email protected]> * Update scatter_update to propagate axis with integer type instead of scatter_update_axis Signed-off-by: Andrew Park <[email protected]> * Revert "Fix not to check the new layout is identical empty tensor" This reverts commit 1215c70. Signed-off-by: Andrew Park <[email protected]> Co-authored-by: Ahn, Paul Y <[email protected]> Final PR for fixing issues on existing TCs for gpufunctest (openvinotoolkit#72) * Initial integration into InferReqeust for RemoteBlob and DynamicBatch Signed-off-by: Andrew Park <[email protected]> * Enable DynamicBatch related logics Signed-off-by: Andrew Park <[email protected]> * Fix PartialShape comparison related issues on TensorIterator/LSTMSequenceTest Signed-off-by: Andrew Park <[email protected]> * Fix feature representation for slope layout when shape has a dimension = 1 Signed-off-by: Andrew Park <[email protected]> * Revert "Fix feature representation for slope layout when shape has a dimension = 1" This reverts commit 1169fbb. * Revert "Fix PartialShape comparison related issues on TensorIterator/LSTMSequenceTest" This reverts commit 664175c. Signed-off-by: Andrew Park <[email protected]>
- Loading branch information
1 parent
d6088e9
commit 855d005
Showing
14 changed files
with
495 additions
and
102 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/plugins/intel_gpu/include/intel_gpu/plugin/async_infer_request_legacy.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (C) 2018-2022 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include <string> | ||
#include <map> | ||
#include <cpp_interfaces/impl/ie_infer_async_request_thread_safe_default.hpp> | ||
#include "intel_gpu/plugin/infer_request_legacy.hpp" | ||
|
||
namespace ov { | ||
namespace runtime { | ||
namespace intel_gpu { | ||
|
||
class AsyncInferRequestLegacy : public InferenceEngine::AsyncInferRequestThreadSafeDefault { | ||
public: | ||
using Parent = InferenceEngine::AsyncInferRequestThreadSafeDefault; | ||
AsyncInferRequestLegacy(const InferRequestLegacy::Ptr &inferRequest, | ||
const InferenceEngine::ITaskExecutor::Ptr& taskExecutor, | ||
const InferenceEngine::ITaskExecutor::Ptr& waitExecutor, | ||
const InferenceEngine::ITaskExecutor::Ptr& callbackExecutor); | ||
|
||
~AsyncInferRequestLegacy(); | ||
|
||
void Infer_ThreadUnsafe() override; | ||
void StartAsync_ThreadUnsafe() override; | ||
|
||
private: | ||
InferRequestLegacy::Ptr _inferRequest; | ||
InferenceEngine::ITaskExecutor::Ptr _waitExecutor; | ||
}; | ||
|
||
} // namespace intel_gpu | ||
} // namespace runtime | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/plugins/intel_gpu/src/plugin/async_infer_request_legacy.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (C) 2018-2022 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "intel_gpu/plugin/async_infer_request_legacy.hpp" | ||
#include "intel_gpu/plugin/itt.hpp" | ||
#include <memory> | ||
|
||
namespace ov { | ||
namespace runtime { | ||
namespace intel_gpu { | ||
|
||
AsyncInferRequestLegacy::AsyncInferRequestLegacy(const InferRequestLegacy::Ptr &inferRequest, | ||
const InferenceEngine::ITaskExecutor::Ptr& taskExecutor, | ||
const InferenceEngine::ITaskExecutor::Ptr& waitExecutor, | ||
const InferenceEngine::ITaskExecutor::Ptr& callbackExecutor) | ||
: AsyncInferRequestThreadSafeDefault(inferRequest, taskExecutor, callbackExecutor), _inferRequest(inferRequest), _waitExecutor(waitExecutor) { | ||
_pipeline = {}; | ||
|
||
if (!_inferRequest->use_external_queue()) { | ||
_pipeline.push_back({taskExecutor, | ||
[this] { | ||
OV_ITT_SCOPED_TASK(itt::domains::intel_gpu_plugin, "AsyncInferRequestLegacy::PreprocessingAndStartPipeline"); | ||
_inferRequest->setup_stream_graph(); | ||
_inferRequest->preprocess(); | ||
_inferRequest->enqueue(); | ||
_inferRequest->wait(); | ||
} }); | ||
} else { | ||
_pipeline.push_back({ _waitExecutor, | ||
[this] { | ||
OV_ITT_SCOPED_TASK(itt::domains::intel_gpu_plugin, "AsyncInferRequestLegacy::WaitPipeline"); | ||
_inferRequest->wait_notify(); | ||
} }); | ||
} | ||
} | ||
|
||
void AsyncInferRequestLegacy::Infer_ThreadUnsafe() { | ||
if (_inferRequest->use_external_queue()) { | ||
_inferRequest->setup_stream_graph(); | ||
_inferRequest->preprocess_notify(); | ||
_inferRequest->enqueue_notify(); | ||
} | ||
Parent::Infer_ThreadUnsafe(); | ||
} | ||
|
||
void AsyncInferRequestLegacy::StartAsync_ThreadUnsafe() { | ||
if (_inferRequest->use_external_queue()) { | ||
_inferRequest->setup_stream_graph(); | ||
_inferRequest->preprocess_notify(); | ||
_inferRequest->enqueue_notify(); | ||
} | ||
Parent::StartAsync_ThreadUnsafe(); | ||
} | ||
|
||
AsyncInferRequestLegacy::~AsyncInferRequestLegacy() { | ||
StopAndWait(); | ||
} | ||
|
||
} // namespace intel_gpu | ||
} // namespace runtime | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.