Skip to content

Commit bb67f8a

Browse files
committed
Disabling sys_opt/kernel_swap for hw_emu for DFX platforms
1 parent 187bf95 commit bb67f8a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

sys_opt/kernel_swap/config.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# limitations under the License.
1515
#
1616

17-
#Checks for g++
1817
ifneq ($(HOST_ARCH), x86)
19-
device_type := embedded
18+
CXXFLAGS += -Ddevice_type
2019
endif

sys_opt/kernel_swap/src/host.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
#include <vector>
1919

2020
#define LENGTH 1024
21-
#ifndef device_type
22-
#define device_type 1
23-
#endif
2421

2522
int main(int argc, char **argv) {
2623
// Command Line Parser
2724
sda::utils::CmdLineParser parser;
2825

29-
std::cout << "device_type : " << device_type << std::endl;
30-
if (device_type != 0 and xcl::is_hw_emulation()) {
31-
std::cout << "INFO: This example is not supported for dfx platforms for hw_emu" << std::endl;
26+
#ifdef device_type
27+
if (xcl::is_hw_emulation()) {
28+
std::cout
29+
<< "INFO: This example is not supported for dfx platforms for hw_emu"
30+
<< std::endl;
3231
return EXIT_SUCCESS;
3332
}
33+
#endif
3434

3535
// Switches
3636
//**************//"<Full Arg>", "<Short Arg>", "<Description>", "<Default>"

0 commit comments

Comments
 (0)