summaryrefslogtreecommitdiff
path: root/tools/device_query.cpp
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2014-02-24 22:45:29 -0800
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2014-02-26 12:37:44 -0800
commit4f1cdeb4ef35b9f85646a9b624188fd761644f1d (patch)
tree0727acbf45b45c7f3e05120868e62cb3a2faf0c5 /tools/device_query.cpp
parent650b7b16dbbf0ee7b3a7362fce0821315d608d54 (diff)
downloadcaffeonacl-4f1cdeb4ef35b9f85646a9b624188fd761644f1d.tar.gz
caffeonacl-4f1cdeb4ef35b9f85646a9b624188fd761644f1d.tar.bz2
caffeonacl-4f1cdeb4ef35b9f85646a9b624188fd761644f1d.zip
Make tools/ for core binaries, stow scripts/ in tools/extra
Collect core Caffe tools like train_net, device_query, etc. together in tools/ and include helper scripts under tools/extra.
Diffstat (limited to 'tools/device_query.cpp')
-rw-r--r--tools/device_query.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/device_query.cpp b/tools/device_query.cpp
new file mode 100644
index 00000000..88bf5aaa
--- /dev/null
+++ b/tools/device_query.cpp
@@ -0,0 +1,23 @@
+// Copyright 2014 Sergio Guadarrama
+
+
+#include "caffe/common.hpp"
+#include "caffe/net.hpp"
+
+
+using namespace caffe;
+
+int main(int argc, char** argv) {
+ if (argc > 2) {
+ LOG(ERROR) << "device_query [device_id=0]";
+ return 0;
+ }
+ if (argc == 2) {
+ LOG(INFO) << "Querying device_id=" << argv[1];
+ Caffe::SetDevice(atoi(argv[1]));
+ Caffe::DeviceQuery();
+ } else {
+ Caffe::DeviceQuery();
+ }
+ return 0;
+}