2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
NNAPI 런타임
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
NNAPI 런타임 모듈은 앱과 백엔드 드라이버 사이에 위치한 공유 라이브러리입니다. Android Neural Networks API(NNAPI)는 휴대기기에서 계산 집약적인 머신러닝 작업을 실행하고 Android 기기에서 하드웨어 가속 추론 작업을 사용하기 위해 설계된 Android C API입니다. 이 모듈은 업데이트할 수 있습니다. 즉, 일반적인 Android 출시 주기 외에 기능 업데이트를 받을 수 있습니다.
NNAPI 런타임을 모듈화하면 다음과 같은 이점이 있습니다.
최종 사용자 측면에서의 일관성과 호환성이 향상됩니다.
플랫폼 개발자는 NNAPI 런타임의 버그를 패치하고 NNAPI 런타임과 드라이버의 상호작용을 개선하며 NNAPI의 기능, 안정성, 성능 및 상태를 향상하는 새로운 기능을 배포할 수 있습니다.
앱 개발자는 업데이트된 CPU 커널을 사용하여 향상된 앱 호환성 및 성능을 얻게 됩니다.
모듈 경계
Android 12 이상의 경우 NNAPI HAL 버전은 HIDL 대신 AIDL을 사용합니다.
Android 11 이하의 경우 NNAPI 런타임 모듈 경계는 platform/frameworks/ml/nn:libneuralnetworks.so
입니다.
NNAPI 런타임 모듈(com.android.neuralnetworks
)은 APEX 형식이며 Android 11 이상을 실행하는 기기에서 사용할 수 있습니다.
모듈 종속 항목
이 NNAPI 런타임 모듈은 NNAPI HAL과 AHardwareBuffer에 종속됩니다.
테스트
NNAPI 런타임 모듈의 기능을 확인하려면 Android 호환성 테스트 모음(CTS) 및 공급업체 테스트 모음(VTS) 테스트를 사용하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# NNAPI Runtime\n\n| **Deprecated:** Starting in Android 15, the\n| [NNAPI (NDK API)](https://developer.android.com/ndk/guides/neuralnetworks) is deprecated. The Neural Networks HAL interface\n| continues to be supported.\n|\n| For more information, see the\n| [NNAPI Migration Guide](https://developer.android.com/ndk/guides/neuralnetworks/migration-guide).\n\nThe NNAPI Runtime module is a shared library that sits between an app and\nbackend drivers. The [Android Neural Networks API\n(NNAPI)](https://developer.android.com/ndk/guides/neuralnetworks/)\nis an Android C API designed for running computationally intensive operations\nfor machine learning on mobile devices and enables hardware-accelerated\ninference operations on Android devices. This module is updatable, meaning it\ncan receive updates to functionality outside of the normal Android release\ncycle.\n\nThe benefits of modularizing the NNAPI Runtime include the following.\n\n- End users get improved consistency and compatibility.\n\n- Platform developers can patch bugs in the NNAPI runtime, improve NNAPI runtime\n interaction with drivers, and deploy new features that improve NNAPI\n capabilities, stability, performance, and health.\n\n- App developers get improved app compatibility and performance with updated CPU\n kernels.\n\nModule boundary\n---------------\n\nFor Android 12 and higher, the NNAPI HAL revision\nuses AIDL instead of HIDL.\n\nFor Android 11 and lower, the NNAPI Runtime module\nboundary is `platform/frameworks/ml/nn:libneuralnetworks.so`.\n\nModule format\n-------------\n\nThe NNAPI Runtime module (`com.android.neuralnetworks`) is in\n[APEX](/docs/core/ota/apex) format and is available for devices\nrunning Android 11 or higher.\n\nModule dependencies\n-------------------\n\nThis NNAPI Runtime module depends on the [NNAPI\nHAL](/docs/core/interaction/neural-networks#nnhal) and\n[AHardwareBuffer](/docs/core/interaction/neural-networks/memory-pools#ahardwarebuffer).\n\nTesting\n-------\n\nTo verify the functionality of the NNAPI Runtime module, use the Android\nCompatibility Test Suite (CTS) and Vendor Test Suite (VTS) tests."]]