aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/SConscript17
-rw-r--r--utils/GraphUtils.cpp6
2 files changed, 15 insertions, 8 deletions
diff --git a/examples/SConscript b/examples/SConscript
index 16f31d93d4..8ece7e60b2 100644
--- a/examples/SConscript
+++ b/examples/SConscript
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# Copyright (c) 2017-2023 Arm Limited.
+# Copyright (c) 2017-2024 Arm Limited.
#
# SPDX-License-Identifier: MIT
#
@@ -51,11 +51,18 @@ else:
graph_dependency = [arm_compute_graph_so]
extra_link_flags = []
-if env['os'] != 'bare_metal':
+
+if not env['os'] in ['windows','bare_metal'] :
extra_link_flags += ['-fstack-protector-strong']
-load_whole_archive = '-Wl,--whole-archive'
-noload_whole_archive = '-Wl,--no-whole-archive'
+
+if env['os'] != 'windows' :
+ load_whole_archive = '-Wl,--whole-archive'
+ noload_whole_archive = '-Wl,--no-whole-archive'
+else:
+ load_whole_archive = '/wholearchive'
+ noload_whole_archive = ''
+
if 'macos' in examples_env['os']:
load_whole_archive = '-Wl,-force_load'
noload_whole_archive = ''
@@ -67,7 +74,7 @@ examples_libs = examples_env.get("LIBS",[])
for file in Glob("./graph_*.cpp"):
example = os.path.basename(os.path.splitext(str(file))[0])
prog = None
- if env['os'] in ['android', 'macos', 'bare_metal'] or env['standalone']:
+ if env['os'] in ['android','windows', 'macos', 'bare_metal'] or env['standalone']:
prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = examples_libs + arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+[load_whole_archive, graph_dependency, noload_whole_archive] + extra_link_flags)
Depends(prog, graph_dependency)
prog = install_bin(prog)
diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp
index ca8e14abba..7e618c9de5 100644
--- a/utils/GraphUtils.cpp
+++ b/utils/GraphUtils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2021, 2024 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -711,13 +711,13 @@ bool RandomAccessor::access_tensor(ITensor &tensor)
case DataType::QASYMM8:
case DataType::U8:
{
- std::uniform_int_distribution<uint8_t> distribution_u8(_lower.get<uint8_t>(), _upper.get<uint8_t>());
+ std::uniform_int_distribution<uint32_t> distribution_u8(_lower.get<uint8_t>(), _upper.get<uint8_t>());
fill<uint8_t>(tensor, distribution_u8);
break;
}
case DataType::S8:
{
- std::uniform_int_distribution<int8_t> distribution_s8(_lower.get<int8_t>(), _upper.get<int8_t>());
+ std::uniform_int_distribution<int32_t> distribution_s8(_lower.get<int8_t>(), _upper.get<int8_t>());
fill<int8_t>(tensor, distribution_s8);
break;
}