tkDNN library version 0.1
This commit is contained in:
@@ -14,5 +14,4 @@ add_library(tkDNN SHARED src/Layer.cpp src/LayerWgs.cpp
|
|||||||
target_link_libraries(tkDNN kernels ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES} ${CUDA_TOOLKIT_ROOT_DIR}/lib/libcudnn.so)
|
target_link_libraries(tkDNN kernels ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES} ${CUDA_TOOLKIT_ROOT_DIR}/lib/libcudnn.so)
|
||||||
|
|
||||||
add_executable(tkDNNtest tests/test.cpp)
|
add_executable(tkDNNtest tests/test.cpp)
|
||||||
message(${CUDA_LIBRARIES})
|
|
||||||
target_link_libraries(tkDNNtest tkDNN)
|
target_link_libraries(tkDNNtest tkDNN)
|
||||||
+5
-1
@@ -1,12 +1,16 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "tkdnn.h"
|
||||||
#include "Network.h"
|
#include "Network.h"
|
||||||
|
|
||||||
namespace tkDNN {
|
namespace tkDNN {
|
||||||
|
|
||||||
Network::Network() {
|
Network::Network() {
|
||||||
|
|
||||||
std::cout<<"New NETWORK with CUDNN v"<<float(cudnnGetVersion())/1000<<"\n";
|
float tk_ver = float(tkDNN::getVersion())/1000;
|
||||||
|
float cu_ver = float(cudnnGetVersion())/1000;
|
||||||
|
|
||||||
|
std::cout<<"New NETWORK (tkDNN v"<<tk_ver<<", CUDNN v"<<cu_ver<<")\n";
|
||||||
dataType = CUDNN_DATA_FLOAT;
|
dataType = CUDNN_DATA_FLOAT;
|
||||||
tensorFormat = CUDNN_TENSOR_NCHW;
|
tensorFormat = CUDNN_TENSOR_NCHW;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
#include<iostream>
|
#include<iostream>
|
||||||
#include "Layer.h"
|
#include "tkdnn.h"
|
||||||
|
|
||||||
const char *input_bin = "../tests/input.bin";
|
const char *input_bin = "../tests/input.bin";
|
||||||
const char *c0_bin = "../tests/conv0.bin";
|
const char *c0_bin = "../tests/conv0.bin";
|
||||||
@@ -60,7 +60,7 @@ int main() {
|
|||||||
data = d4.infer(dim, data); dim.print();
|
data = d4.infer(dim, data); dim.print();
|
||||||
data = a4.infer(dim, data); dim.print();
|
data = a4.infer(dim, data); dim.print();
|
||||||
data = d5.infer(dim, data); dim.print();
|
data = d5.infer(dim, data); dim.print();
|
||||||
|
|
||||||
TIMER_STOP
|
TIMER_STOP
|
||||||
|
|
||||||
// Print result
|
// Print result
|
||||||
|
|||||||
Reference in New Issue
Block a user