This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mali t624, is there an OpenCL.so?

Hi,

I'm trying to develop an app for Android using the Android Studio and OpenCL. I've pulled the shared library libGLES_mali.so from my testing phone (a Huwaei P8) and attempted to link the library when building the app with Gradle in Android Studio. However, the build fails during linking, giving "undefined reference to clGetPlatformIDs" for each OpenCL function in the program.

From that, it seems to me like the libGLES_mali.so file doesn't have the implementation of OpenCL. So is there a OpenCL shared library file for this version?

Of course, I may just have an error in how I'm building with Android Studio, so here's the build.gradle for my app

apply plugin: 'com.android.model.application'

model {

    repositories {
        libs(PrebuiltLibraries) {

            OpenCL {
                headers.srcDir "src/main/jni/CL"
                binaries.withType(SharedLibraryBinary) {
                    sharedLibraryFile = file("src/main/jni/libGLES_mali.so")
                }
            }
        }
    }

    android {
        compileSdkVersion = 21
        buildToolsVersion = "21.1.2"

        defaultConfig.with {
            applicationId = "org.siprop.android.openclsample"
            minSdkVersion.apiLevel = 19
            targetSdkVersion.apiLevel = 21
            versionCode = 1
            versionName = "1.0"
        }
    }

    /*
     * native build settings
     */
    android.ndk {
        moduleName = "openclsample-jni"
        CFlags.add("-I${file("src/main/jni/CL")}".toString())
        ldLibs.addAll(["android", "log", "GLES_mali"])
        // ldLibs = ["android", "log", "opencl"]
        stl = "stlport_static"

    }

    android.buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    android.productFlavors {
        create("arm8") {
            ndk.abiFilters.add("arm64-v8a")
        }
    }

    android.sources {
        main {
            jni {
                dependencies {
                    library "OpenCL" linkage "shared"
                }
            }
        }
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.0'
}

I appreciate any help, thanks for your time,

Parents
  • Hi MBTree,

    Mali-T62x can support OpenCL.

    Whether to ship OpenCL support or not for a given phone is a decision for that phone's manufacturer. Binary drivers must be obtained from that manufacturer or the chipset manufacturer; we don't provide binary drivers directly except for a very small number of development platforms.

    Hope that helps,
    Pete
Reply
  • Hi MBTree,

    Mali-T62x can support OpenCL.

    Whether to ship OpenCL support or not for a given phone is a decision for that phone's manufacturer. Binary drivers must be obtained from that manufacturer or the chipset manufacturer; we don't provide binary drivers directly except for a very small number of development platforms.

    Hope that helps,
    Pete
Children
No data