psteinb / compass Goto Github PK
View Code? Open in Web Editor NEWdrop-in header-only C++ library to detect hardware capabilities at runtime and at compiletime
License: BSD 3-Clause "New" or "Revised" License
drop-in header-only C++ library to detect hardware capabilities at runtime and at compiletime
License: BSD 3-Clause "New" or "Revised" License
We run into the issue of a standardization process for hardware topologies and I think HSA can help us with names and layers.
What is the current state of compass. The current compass usage usually looks like this:
auto vendor = compass::runtime::vendor();
auto device_name = compass::runtime::device_name();
auto value = compass::runtime::has(compass::feature::sse());
...
The instantiation of the corresponding wrappers happens at compile-time through the detection of
mostly retrieved by macros coming from header includes and compilers.
So, the code above always refer to CPU device (keep in mind, nvcc does not compile host code). So first thing coming up here is:
There is a need for a layer for the devices within a node. C++AMP just calls them accelerator, which does not seem sufficient for our library. What about HSA, what's their convention:
1x compass instance only sees 1x node, but n devices (HSA refers to as agents).
// possible compass API
auto node = compass::node();
auto node_compiletime = compass::compiletime::node(); // for compile-time structure
auto vendor = compass::vendor(node);
compass::node
and compass::devices
to get [compile-time] properties encapsulated in structures?// possible compass API
...
auto devices = compass::devices();
auto value_node = compass::has(node, compass::feature::sse());
auto value_dev = compass::has(devices[0], compass::feature::sse());
auto devices_gpu = compass::devices(compass::device_type::gpu);
...
... coming from issue #3
Instead of:
auto node = compass::node();
auto devices = compass::devices();
auto value_node = compass::has(node, compass::feature::sse());
auto value_dev = compass::has(devices[0], compass::feature::sse());
...
what about:
auto node = compass::node();
auto devices = compass::devices();
auto value_node = node.has(compass::feature::sse());
auto value_dev = devices[0].has(compass::feature::sse());
...
once #8 is merged, as outlined
in include/detail/rt/linux_os_impl.hpp
, /proc/cpuinfo
is opened multiple times and read in, it would be nice if this could only be done once in a thread-safe manner
There are other libraries around which try to provide a generic hardware discovering.
What is done there and what can be re-used in compass?
The ideal case would be to gather the authors and merge the work into compass.
I will try to list them in this issue...
travis CI is using AMD EPYC 7401P 24-Core Processor
recently, compass cannot detect the cache hierarchy correctly there
https://travis-ci.org/psteinb/compass/jobs/417308560
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.