Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
5,812 additions
and
2,154 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,117 changes: 863 additions & 254 deletions
1,117
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
Large diffs are not rendered by default.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnCTCLossAlgo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* JCudnn - Java bindings for cuDNN, the NVIDIA CUDA | ||
* Deep Neural Network library, to be used with JCuda | ||
* | ||
* Copyright (c) 2015-2017 Marco Hutter - http://www.jcuda.org | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package jcuda.jcudnn; | ||
|
||
public class cudnnCTCLossAlgo | ||
{ | ||
public static final int CUDNN_CTC_LOSS_ALGO_DETERMINISTIC = 0; | ||
public static final int CUDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC = 1; | ||
|
||
/** | ||
* Private constructor to prevent instantiation | ||
*/ | ||
private cudnnCTCLossAlgo() | ||
{ | ||
// Private constructor to prevent instantiation | ||
} | ||
|
||
/** | ||
* Returns a string representation of the given constant | ||
* | ||
* @return A string representation of the given constant | ||
*/ | ||
public static String stringFor(int n) | ||
{ | ||
switch (n) | ||
{ | ||
case CUDNN_CTC_LOSS_ALGO_DETERMINISTIC: return "CUDNN_CTC_LOSS_ALGO_DETERMINISTIC"; | ||
case CUDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC: return "CUDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC"; | ||
} | ||
return "INVALID cudnnCTCLossAlgo: "+n; | ||
} | ||
} | ||
|
58 changes: 58 additions & 0 deletions
58
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnCTCLossDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* JCudnn - Java bindings for cuDNN, the NVIDIA CUDA | ||
* Deep Neural Network library, to be used with JCuda | ||
* | ||
* Copyright (c) 2015-2017 Marco Hutter - http://www.jcuda.org | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package jcuda.jcudnn; | ||
|
||
import jcuda.NativePointerObject; | ||
|
||
/** | ||
* Java port of a cudnnCTCLossDescriptor | ||
*/ | ||
public class cudnnCTCLossDescriptor extends NativePointerObject | ||
{ | ||
/** | ||
* Creates a new, uninitialized cudnnCTCLossDescriptor | ||
*/ | ||
public cudnnCTCLossDescriptor() | ||
{ | ||
// Default constructor | ||
} | ||
|
||
/** | ||
* Returns a String representation of this object. | ||
* | ||
* @return A String representation of this object. | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
return "cudnnCTCLossDescriptor["+ | ||
"nativePointer=0x"+Long.toHexString(getNativePointer())+"]"; | ||
} | ||
} | ||
|
||
|
61 changes: 61 additions & 0 deletions
61
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnDeterminism.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* JCudnn - Java bindings for cuDNN, the NVIDIA CUDA | ||
* Deep Neural Network library, to be used with JCuda | ||
* | ||
* Copyright (c) 2015-2017 Marco Hutter - http://www.jcuda.org | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package jcuda.jcudnn; | ||
|
||
/** | ||
* CUDNN Determinism | ||
*/ | ||
public class cudnnDeterminism | ||
{ | ||
public static final int CUDNN_NON_DETERMINISTIC = 0; | ||
public static final int CUDNN_DETERMINISTIC = 1; | ||
|
||
/** | ||
* Private constructor to prevent instantiation | ||
*/ | ||
private cudnnDeterminism() | ||
{ | ||
// Private constructor to prevent instantiation | ||
} | ||
|
||
/** | ||
* Returns a string representation of the given constant | ||
* | ||
* @return A string representation of the given constant | ||
*/ | ||
public static String stringFor(int n) | ||
{ | ||
switch (n) | ||
{ | ||
case CUDNN_NON_DETERMINISTIC: return "CUDNN_NON_DETERMINISTIC"; | ||
case CUDNN_DETERMINISTIC: return "CUDNN_DETERMINISTIC"; | ||
} | ||
return "INVALID cudnnDeterminism: "+n; | ||
} | ||
} | ||
|
60 changes: 60 additions & 0 deletions
60
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnErrQueryMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* JCudnn - Java bindings for cuDNN, the NVIDIA CUDA | ||
* Deep Neural Network library, to be used with JCuda | ||
* | ||
* Copyright (c) 2015-2017 Marco Hutter - http://www.jcuda.org | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package jcuda.jcudnn; | ||
|
||
public class cudnnErrQueryMode | ||
{ | ||
public static final int CUDNN_ERRQUERY_RAWCODE = 0; | ||
public static final int CUDNN_ERRQUERY_NONBLOCKING = 1; | ||
public static final int CUDNN_ERRQUERY_BLOCKING = 2; | ||
|
||
/** | ||
* Private constructor to prevent instantiation | ||
*/ | ||
private cudnnErrQueryMode() | ||
{ | ||
// Private constructor to prevent instantiation | ||
} | ||
|
||
/** | ||
* Returns a string representation of the given constant | ||
* | ||
* @return A string representation of the given constant | ||
*/ | ||
public static String stringFor(int n) | ||
{ | ||
switch (n) | ||
{ | ||
case CUDNN_ERRQUERY_RAWCODE: return "CUDNN_ERRQUERY_RAWCODE"; | ||
case CUDNN_ERRQUERY_NONBLOCKING: return "CUDNN_ERRQUERY_NONBLOCKING"; | ||
case CUDNN_ERRQUERY_BLOCKING: return "CUDNN_ERRQUERY_BLOCKING"; | ||
} | ||
return "INVALID cudnnErrQueryMode: "+n; | ||
} | ||
} | ||
|
68 changes: 68 additions & 0 deletions
68
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnIndicesType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* JCudnn - Java bindings for cuDNN, the NVIDIA CUDA | ||
* Deep Neural Network library, to be used with JCuda | ||
* | ||
* Copyright (c) 2015-2017 Marco Hutter - http://www.jcuda.org | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package jcuda.jcudnn; | ||
|
||
/** | ||
* <pre> | ||
* CUDNN tensor indices type size (all unsigned) | ||
* Currently not supported, default is 32 bit unsigned. | ||
* </pre> | ||
*/ | ||
public class cudnnIndicesType | ||
{ | ||
public static final int CUDNN_32BIT_INDICES = 0; | ||
public static final int CUDNN_64BIT_INDICES = 1; | ||
public static final int CUDNN_16BIT_INDICES = 2; | ||
public static final int CUDNN_8BIT_INDICES = 3; | ||
|
||
/** | ||
* Private constructor to prevent instantiation | ||
*/ | ||
private cudnnIndicesType() | ||
{ | ||
// Private constructor to prevent instantiation | ||
} | ||
|
||
/** | ||
* Returns a string representation of the given constant | ||
* | ||
* @return A string representation of the given constant | ||
*/ | ||
public static String stringFor(int n) | ||
{ | ||
switch (n) | ||
{ | ||
case CUDNN_32BIT_INDICES: return "CUDNN_32BIT_INDICES"; | ||
case CUDNN_64BIT_INDICES: return "CUDNN_64BIT_INDICES"; | ||
case CUDNN_16BIT_INDICES: return "CUDNN_16BIT_INDICES"; | ||
case CUDNN_8BIT_INDICES: return "CUDNN_8BIT_INDICES"; | ||
} | ||
return "INVALID cudnnIndicesType: "+n; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* JCudnn - Java bindings for cuDNN, the NVIDIA CUDA | ||
* Deep Neural Network library, to be used with JCuda | ||
* | ||
* Copyright (c) 2015-2017 Marco Hutter - http://www.jcuda.org | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package jcuda.jcudnn; | ||
|
||
/** | ||
* CUDNN math type | ||
*/ | ||
public class cudnnMathType | ||
{ | ||
public static final int CUDNN_DEFAULT_MATH = 0; | ||
public static final int CUDNN_TENSOR_OP_MATH = 1; | ||
|
||
/** | ||
* Private constructor to prevent instantiation | ||
*/ | ||
private cudnnMathType() | ||
{ | ||
// Private constructor to prevent instantiation | ||
} | ||
|
||
/** | ||
* Returns a string representation of the given constant | ||
* | ||
* @return A string representation of the given constant | ||
*/ | ||
public static String stringFor(int n) | ||
{ | ||
switch (n) | ||
{ | ||
case CUDNN_DEFAULT_MATH: return "CUDNN_DEFAULT_MATH"; | ||
case CUDNN_TENSOR_OP_MATH: return "CUDNN_TENSOR_OP_MATH"; | ||
} | ||
return "INVALID cudnnMathType: "+n; | ||
} | ||
} | ||
|
Oops, something went wrong.