-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11e99dd
commit 36f795b
Showing
60 changed files
with
714 additions
and
473 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "impls/registry/implementation_manager.hpp" | ||
#include "program_node.h" | ||
|
||
#include <memory> | ||
namespace cldnn { | ||
namespace ocl { | ||
|
||
struct GatherNDImplementationManager : public ImplementationManager { | ||
OV_GPU_PRIMITIVE_IMPL("GatherNDImplementationOCL") | ||
GatherNDImplementationManager(shape_types shape_type, ValidateFunc vf = nullptr) : ImplementationManager(impl_types::ocl, shape_type, vf) {} | ||
std::unique_ptr<primitive_impl> create_impl(const program_node& node, const kernel_impl_params& params) const override; | ||
bool validate_impl(const program_node& node) const override { | ||
static const std::vector<format> supported_fmts = { | ||
format::bfyx, | ||
format::bfzyx, | ||
format::bfwzyx | ||
}; | ||
|
||
static const std::vector<ov::element::Type_t> supported_in_types = { | ||
ov::element::f32, | ||
ov::element::f16, | ||
ov::element::i32 | ||
}; | ||
|
||
static const std::vector<ov::element::Type_t> supported_out_types = { | ||
ov::element::f32, | ||
ov::element::f16, | ||
ov::element::i32, | ||
ov::element::i8, | ||
ov::element::u8, | ||
}; | ||
|
||
const auto& in0_layout = node.get_input_layout(0); | ||
const auto& in1_layout = node.get_input_layout(1); | ||
const auto& out_layout = node.get_output_layout(0); | ||
if (!one_of(in0_layout.format, supported_fmts) || !one_of(out_layout.format, supported_fmts)) | ||
return false; | ||
|
||
if (!one_of(in0_layout.data_type, supported_in_types) || !one_of(in1_layout.data_type, supported_in_types)) | ||
return false; | ||
|
||
if (!one_of(out_layout.data_type, supported_out_types)) | ||
return false; | ||
|
||
return true; | ||
} | ||
}; | ||
|
||
} // namespace ocl | ||
} // namespace cldnn |
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.