Skip to content

Commit

Permalink
Update of JCudnn for cuDNN 7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jcuda committed Sep 20, 2017
1 parent 53de60e commit 2ba861a
Show file tree
Hide file tree
Showing 16 changed files with 5,812 additions and 2,154 deletions.
5,773 changes: 3,896 additions & 1,877 deletions JCudnnJNI/src/JCudnn.cpp

Large diffs are not rendered by default.

334 changes: 311 additions & 23 deletions JCudnnJNI/src/JCudnn.hpp

Large diffs are not rendered by default.

1,117 changes: 863 additions & 254 deletions JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions JCudnnJava/src/main/java/jcuda/jcudnn/cudnnCTCLossAlgo.java
@@ -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 JCudnnJava/src/main/java/jcuda/jcudnn/cudnnCTCLossDescriptor.java
@@ -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 JCudnnJava/src/main/java/jcuda/jcudnn/cudnnDeterminism.java
@@ -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 JCudnnJava/src/main/java/jcuda/jcudnn/cudnnErrQueryMode.java
@@ -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 JCudnnJava/src/main/java/jcuda/jcudnn/cudnnIndicesType.java
@@ -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;
}
}

61 changes: 61 additions & 0 deletions JCudnnJava/src/main/java/jcuda/jcudnn/cudnnMathType.java
@@ -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;
}
}

0 comments on commit 2ba861a

Please sign in to comment.