Skip to content

Commit a587ef5

Browse files
author
Ubuntu
committed
fixed the convolution.c import
use cuda 10.1
1 parent 3780adc commit a587ef5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

dnn/cgoflags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ package cudnn
55
//
66
// // default locs:
77
// #cgo LDFLAGS:-L/usr/local/cuda/lib64 -L/usr/local/cuda/lib
8-
// #cgo CFLAGS: -I/usr/include/x86_64-linux-gnu -I/usr/local/cuda-9.0/targets/x86_64-linux/include -I/usr/local/cuda/include
8+
// #cgo CFLAGS: -I/usr/include/x86_64-linux-gnu -I/usr/local/cuda-10.1/targets/x86_64-linux/include -I/usr/local/cuda/include
99
import "C"

dnn/convolution.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
#include <cudnn_v7.h>
1+
#include <cudnn.h>
22

33
cudnnStatus_t gocudnnNewConvolution(cudnnConvolutionDescriptor_t *retVal,
4-
cudnnMathType_t mathType, const int groupCount,
4+
cudnnMathType_t mathType, const int groupCount,
55
const int size, const int* padding,
6-
const int* filterStrides,
6+
const int* filterStrides,
77
const int* dilation,
88
cudnnConvolutionMode_t convolutionMode, cudnnDataType_t dataType) {
99

1010
cudnnStatus_t status ;
1111
status = cudnnCreateConvolutionDescriptor(retVal);
1212
if (status != CUDNN_STATUS_SUCCESS) {
13-
return status;
13+
return status;
1414
}
1515

1616
status = cudnnSetConvolutionMathType(*retVal, mathType);
1717
if (status != CUDNN_STATUS_SUCCESS) {
1818
return status;
1919
}
2020

21-
status = cudnnSetConvolutionGroupCount(*retVal, groupCount);
21+
status = cudnnSetConvolutionGroupCount(*retVal, groupCount);
2222
if (status != CUDNN_STATUS_SUCCESS) {
2323
return status;
2424
}
2525

2626
int padH;
2727
int padW;
2828
int u;
29-
int v;
29+
int v;
3030
int dilationH;
3131
int dilationW;
3232
switch (size) {
@@ -39,17 +39,17 @@ cudnnStatus_t gocudnnNewConvolution(cudnnConvolutionDescriptor_t *retVal,
3939
u = filterStrides[0];
4040
v = filterStrides[1];
4141
dilationH = dilation[0];
42-
dilationW = dilation[1];
42+
dilationW = dilation[1];
4343

44-
status = cudnnSetConvolution2dDescriptor(*retVal,
45-
padH, padW,
46-
u, v,
47-
dilationH, dilationW,
44+
status = cudnnSetConvolution2dDescriptor(*retVal,
45+
padH, padW,
46+
u, v,
47+
dilationH, dilationW,
4848
convolutionMode, dataType);
4949
break;
5050
default:
5151
status = cudnnSetConvolutionNdDescriptor(*retVal, size, padding, filterStrides, dilation, convolutionMode, dataType);
5252
break;
5353
}
5454
return status;
55-
}
55+
}

0 commit comments

Comments
 (0)