Skip to content

Commit 9edbe10

Browse files
Solving some compilation warnings
1 parent 44f7a0d commit 9edbe10

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/plugins/intel_npu/src/al/include/intel_npu/icompiler.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ class ICompiler : public std::enable_shared_from_this<ICompiler> {
7878
* Allocate W1 -> Init1
7979
* Allocate W2 -> Init2
8080
* Allocate W3 -> Init2
81-
*
81+
*
8282
* This is why there is an additional parameter callNumber:
8383
* Compiler should somehow understand wich Init(or Main) to return
8484
* Plugin does not know total numbers og Init schedules
8585
*/
8686
virtual std::shared_ptr<NetworkDescription> compileWS_v3(const std::shared_ptr<ov::Model>& model,
87-
const Config& config, size_t callNumber) const = 0;
87+
const Config& config,
88+
size_t callNumber) const = 0;
8889

8990
/**
9091
* @brief Returns information about supported layers of the network passed

src/plugins/intel_npu/src/compiler_adapter/src/driver_graph.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ void DriverGraph::custom_export(std::ostream& stream,
9090
manager.run_passes(initModel);
9191

9292
xmlContent.seekg(0, std::ios::end);
93-
uint32_t xmlSize = xmlContent.tellp();
93+
uint32_t xmlSize = static_cast<uint32_t>(xmlContent.tellp());
9494
xmlContent.seekg(0, std::ios::beg);
9595
binContent.seekg(0, std::ios::end);
96-
uint32_t binSize = binContent.tellp();
96+
uint32_t binSize = static_cast<uint32_t>(binContent.tellp());
9797
binContent.seekg(0, std::ios::beg);
9898

9999
stream << xmlSize;
@@ -102,10 +102,10 @@ void DriverGraph::custom_export(std::ostream& stream,
102102
stream << binSize;
103103
stream << binContent.rdbuf();
104104

105-
stream << mainBlobSize;
105+
stream << static_cast<uint32_t>(mainBlobSize);
106106
stream.write(reinterpret_cast<const char*>(mainBlobPtr), mainBlobSize);
107107

108-
stream << initBlobSize;
108+
stream << static_cast<uint32_t>(initBlobSize);
109109
stream.write(reinterpret_cast<const char*>(initBlobPtr), initBlobSize);
110110

111111
if (!stream) {

src/plugins/intel_npu/src/compiler_adapter/src/plugin_graph.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ void PluginGraph::custom_export(std::ostream& stream,
4343
manager.run_passes(initModel);
4444

4545
xmlContent.seekg(0, std::ios::end);
46-
uint32_t xmlSize = xmlContent.tellp();
46+
uint32_t xmlSize = static_cast<uint32_t>(xmlContent.tellp());
4747
xmlContent.seekg(0, std::ios::beg);
4848
binContent.seekg(0, std::ios::end);
49-
uint32_t binSize = binContent.tellp();
49+
uint32_t binSize = static_cast<uint32_t>(binContent.tellp());
5050
binContent.seekg(0, std::ios::beg);
5151

5252
stream << xmlSize;
@@ -55,12 +55,12 @@ void PluginGraph::custom_export(std::ostream& stream,
5555
stream << binSize;
5656
stream << binContent.rdbuf();
5757

58-
uint32_t mainBlobSize = _blob.size();
58+
uint32_t mainBlobSize = static_cast<uint32_t>(_blob.size());
5959
stream << mainBlobSize;
6060
stream.write(reinterpret_cast<const char*>(_blob.data()), _blob.size());
6161

6262
const auto& initBlob = initGraph->_blob;
63-
uint32_t initBlobSize = initBlob.size();
63+
uint32_t initBlobSize = static_cast<uint32_t>(initBlob.size());
6464
stream << initBlobSize;
6565
stream.write(reinterpret_cast<const char*>(initBlob.data()), initBlob.size());
6666

0 commit comments

Comments
 (0)