nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/util/DataTypeUtil.java
public static DataBuffer.Type getDtypeFromContext(String dType) {
        switch (dType) {
            case "double":
                return DataBuffer.Type.DOUBLE;
            case "float":
                return DataBuffer.Type.FLOAT;
            case "int":
                return DataBuffer.Type.INT;
            case "half":
                return DataBuffer.Type.HALF;
            default:
                return DataBuffer.Type.FLOAT;
        }
    }
public static DataBuffer.Type getDtypeFromContext(String dType) {
        switch (dType) {
            case "double":
                return DataBuffer.Type.DOUBLE;
            case "float":
                return DataBuffer.Type.FLOAT;
            case "int":
                return DataBuffer.Type.INT;
            case "half":
                return DataBuffer.Type.HALF;
            default:
                return DataBuffer.Type.FLOAT;
        }
    }
Get the allocation mode from the context
@return