Skip to content

Commit

Permalink
resolve ODR issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-paramuzov committed Oct 2, 2024
1 parent c0bd025 commit 7392425
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "fully_connected_inst.h"
#include "assign_inst.h"
#include "mvn_inst.h"
#include "reorder_inst.h"

#include <algorithm>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "pass_manager.h"
#include "program_helpers.h"
#include "reshape_inst.h"
#include "reorder_inst.h"
#include <vector>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "shape_of_inst.h"
#include "broadcast_inst.h"
#include "non_zero_inst.h"
#include "non_max_suppression_inst.h"
#include "reorder_inst.h"
#include "unique_inst.hpp"
#include "program_helpers.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "convolution_inst.h"
#include "deconvolution_inst.h"
#include "fully_connected_inst.h"
#include "reorder_inst.h"
#include "intel_gpu/runtime/format.hpp"
#ifdef ENABLE_ONEDNN_FOR_GPU
#include "graph/impls/onednn/utils.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "crop_inst.h"
#include "eltwise_inst.h"
#include "gemm_inst.h"
#include "reorder_inst.h"
#include "read_value_inst.h"
#include "reshape_inst.h"
#include "permute_inst.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "activation_inst.h"
#include "batch_to_space_inst.h"
#include "crop_inst.h"
#include "reorder_inst.h"
#include "eltwise_inst.h"
#include "gemm_inst.h"
#include "lrn_inst.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "data_inst.h"
#include "eltwise_inst.h"
#include "mutable_data_inst.h"
#include "reorder_inst.h"
#include <vector>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "region_yolo_inst.h"
#include "fully_connected_inst.h"
#include "mvn_inst.h"
#include "reorder_inst.h"

#include <vector>
#include <list>
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/intel_gpu/src/graph/impls/ocl/reorder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
//

#include "impls/registry/implementation_manager.hpp"
#include "intel_gpu/primitives/reorder.hpp"
#include "program_node.h"
#include "reorder_inst.h"

#include <memory>
namespace cldnn {
Expand Down
22 changes: 20 additions & 2 deletions src/plugins/intel_gpu/src/runtime/ze/ze_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ device_info init_device_info(ze_driver_handle_t driver, ze_device_handle_t devic
ZE_CHECK(zeDriverGetProperties(driver, &driver_properties));

bool supports_luid = supports_extension(extensions, ZE_DEVICE_LUID_EXT_NAME, ZE_DEVICE_LUID_EXT_VERSION_1_0);
bool supports_ip_version = supports_extension(extensions, ZE_DEVICE_IP_VERSION_EXT_NAME, ZE_DEVICE_IP_VERSION_VERSION_1_0);
bool supports_mutable_list = supports_extension(extensions, ZE_MUTABLE_COMMAND_LIST_EXP_NAME, ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0);

ze_device_ip_version_ext_t ip_version_properties = {ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT, nullptr, 0};
ze_device_properties_t device_properties{ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2, supports_luid ? &ip_version_properties : nullptr};
ze_device_properties_t device_properties{ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2, supports_ip_version ? &ip_version_properties : nullptr};
ZE_CHECK(zeDeviceGetProperties(device, &device_properties));

ze_device_compute_properties_t device_compute_properties{ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES};
Expand Down Expand Up @@ -164,7 +166,23 @@ device_info init_device_info(ze_driver_handle_t driver, ze_device_handle_t devic
std::copy_n(&luid_props.luid.id[0], ZE_MAX_DEVICE_LUID_SIZE_EXT, info.luid.luid.begin());
}

info.supports_mutable_command_list = supports_extension(extensions, ZE_MUTABLE_COMMAND_LIST_EXP_NAME, ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0);
info.supports_mutable_command_list = false;

if (supports_mutable_list) {
ze_mutable_command_list_exp_properties_t mutable_list_props = { ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_PROPERTIES, nullptr, 0, 0 };
ze_device_properties_t device_properties{ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES, &mutable_list_props};
if (zeDeviceGetProperties(device, &device_properties) == ZE_RESULT_SUCCESS) {
ze_mutable_command_exp_flags_t required_features = ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS |
ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT |
ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE |
ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET |
ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT |
ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS;

info.supports_mutable_command_list = (mutable_list_props.mutableCommandFlags & required_features) == required_features;
}
}

return info;
}

Expand Down

0 comments on commit 7392425

Please sign in to comment.