summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8510b66)
raw | patch | inline | side by side (parent: 8510b66)
author | Yuan Zhao <yuanzhao@ti.com> | |
Fri, 6 Sep 2019 20:50:37 +0000 (15:50 -0500) | ||
committer | Yuan Zhao <yuanzhao@ti.com> | |
Fri, 6 Sep 2019 21:16:46 +0000 (16:16 -0500) |
- including the CUSTOM devices
- Update TIDL library build to yocto build
- MCT-1220
- Update TIDL library build to yocto build
- MCT-1220
examples/platforms/main.cpp | patch | blob | history | |
host/Makefile.inc | patch | blob | history |
index 93760fea9b9585c385c7fe28d5a71c255f92cf17..bd9bd9389d119515f3a05662a1638d5e6d573ccf 100644 (file)
}
}
-void getDevices(Platform& platform, cl_device_type type);
+void getDevices(Platform& platform, cl_device_type type, cl_device_type type2);
/******************************************************************************
* main
platforms[p].getInfo(CL_PLATFORM_PROFILE, &str);
cout << " Profile: " << str << endl;
- getDevices(platforms[p], CL_DEVICE_TYPE_ACCELERATOR |
+ getDevices(platforms[p], CL_DEVICE_TYPE_ACCELERATOR,
CL_DEVICE_TYPE_CUSTOM);
}
}
}
-void getDevices(Platform& platform, cl_device_type type)
+void getDevices(Platform& platform, cl_device_type type, cl_device_type type2)
{
std::string str;
cl_context_properties properties[] =
{CL_CONTEXT_PLATFORM, (cl_context_properties)(platform)(), 0};
Context context(type, properties);
+ std::vector<Device> devices = context.getInfo<CL_CONTEXT_DEVICES>();
-
- std::vector<Device> devices= context.getInfo<CL_CONTEXT_DEVICES>();
+ // Add exactly type2 (not a superset) to the list
+ Context context2(type2, properties);
+ std::vector<Device> devices2 = context2.getInfo<CL_CONTEXT_DEVICES>();
+ for (auto &dev : devices2)
+ {
+ cl_device_type type;
+ dev.getInfo(CL_DEVICE_TYPE, &type);
+ if (type == type2)
+ devices.emplace_back(dev);
+ }
for (unsigned int d = 0; d < devices.size(); d++)
{
diff --git a/host/Makefile.inc b/host/Makefile.inc
index 70d3349748b182a9c92b3287f9ef4e3ffe1a3d5d..464cf4f8e109f9ba78768d4d874053fbbfb29480 100644 (file)
--- a/host/Makefile.inc
+++ b/host/Makefile.inc
CORESDK_VERSION ?= 06.01.00.04-20190826
endif
-TIDL_VERSION ?= 06_01_00_04-20190903
+TIDL_VERSION ?= 06_01_00_05-502-2019-09-05_20-51-00
ifeq ($(BUILD_K2H),1)
CORE_SDK?=$(SDOMC_SHARED)/ti-processor-sdk-linux-k2hk-evm-$(CORESDK_VERSION)