{"id":42015024,"url":"https://github.com/deepx-ai/dx_rt_npu_linux_driver","last_synced_at":"2026-01-26T03:02:10.343Z","repository":{"id":307264959,"uuid":"791575133","full_name":"DEEPX-AI/dx_rt_npu_linux_driver","owner":"DEEPX-AI","description":"An open source npu linux PCIe driver for interacting with DEEPX devices over the PCIe interface","archived":false,"fork":false,"pushed_at":"2026-01-05T07:09:42.000Z","size":9598,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T17:40:58.614Z","etag":null,"topics":["driver","edge-ai","hardware-acceleration","neural-networks"],"latest_commit_sha":null,"homepage":"https://deepx.ai","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEEPX-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-25T00:58:58.000Z","updated_at":"2026-01-04T03:34:09.000Z","dependencies_parsed_at":"2025-07-30T11:02:19.756Z","dependency_job_id":"7bf70a54-fd02-459d-8f33-69bb3694d27b","html_url":"https://github.com/DEEPX-AI/dx_rt_npu_linux_driver","commit_stats":null,"previous_names":["deepx-ai/dx_rt_npu_linux_driver"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/DEEPX-AI/dx_rt_npu_linux_driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEPX-AI%2Fdx_rt_npu_linux_driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEPX-AI%2Fdx_rt_npu_linux_driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEPX-AI%2Fdx_rt_npu_linux_driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEPX-AI%2Fdx_rt_npu_linux_driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEEPX-AI","download_url":"https://codeload.github.com/DEEPX-AI/dx_rt_npu_linux_driver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEEPX-AI%2Fdx_rt_npu_linux_driver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28765570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T02:25:41.078Z","status":"ssl_error","status_checked_at":"2026-01-26T02:24:28.809Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["driver","edge-ai","hardware-acceleration","neural-networks"],"created_at":"2026-01-26T03:00:51.442Z","updated_at":"2026-01-26T03:02:10.338Z","avatar_url":"https://github.com/DEEPX-AI.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEEPX Runtime NPU Linux driver\nRT AI Accelerator(NPU) linux driver\n\n## Download\nThis repository contains a submodule.\n```console\n$ git clone --recurse-submodules git@gh.deepx.ai:deepx/dx_rt_npu_linux_driver.git\n```\n***Update submodules***\n```console\n$ git submodule update --remote\n```\n## Prerequisites (Only Accelator Device with PCIe)\n```\nYou need to check whether the accelerator device is recognized properly using the lspci command as shown below.\nIf there is no output from the command, there is a problem with PCIe Link-up.\nPlease contact to DeepX\n$ lspci -vn | grep 1ff4\n0b:00.0 1200: 1ff4:0000\n\nAdditionally, if you want to display the DeepX name in lspci, you can update the PCI DB using the following command.(Only Ubuntu)\n$ sudo update-pciids\n$ lspci\n...\n0b:00.0 Processing accelerators: DEEPX Co., Ltd. DX_M1\n```\n\n## Structure\nSupport Linux kernel Kbuild system.\n\n```console\n- .gitmodules\n\n- [modules]\n    |\n    - device.mk\n    - kbuild\n    - Makefile\n    - build.sh\n    - [rt]\n        - Kbuild\n    - [pci_deepx] : submodule\n        - Kbuild\n\n- [utils] : submodule\n```\n***device.mk***\n- set up configuration for supported devices, you can select device with 'DEVICE=[device]' macro\n```console\n$ make DEVICE=[device]\n```\n- For a device like m1, you need to select a submodule(PCIe) that has a dependency on m1.\n```console\n$ make DEVICE=m1 PCIE=[deepx|xilinx]\n```\n\n| DEVICE | CONFIG                                        |\n|--------|-----------------------------------------------|\n| m1     | CONFIG_DX_AI_ACCEL_M1=y                       |\n|        | submodule: CONFIG_DX_AI_ACCEL_PCIE_DEEPX      |\n\n- For a device like v3, set DEVICE to v3.\n```console\n$ make DEVICE=v3\n```\n\n| DEVICE | CONFIG                                        |\n|--------|-----------------------------------------------|\n| v3     | CONFIG_DX_AI_STAND_V3=y                       |\n\n***Kbuild***\n- Support Linux kernel Kbuild system.\n\n***Makefile***\n- This repository contains a Makefie. Makefile has the following Parameters:\n\n| Parameter Name   | Description                                    |\n|------------------|------------------------------------------------|\n| DEVICE           | m1 refer to 'device.mk'                  |\n| KERNEL_DIR       | Kernel Build Directory                         |\n| INSTALL_MOD_PATH | [PATH]/lib/modules/$(KERNELRELEASE)/extra/     |\n| ARCH             | Architecture Name                              |\n| CROSS_COMPILE    | Cross Compiler                                 |\n\n***build.sh***\n- This is a shell script that supports building. This script runs the Makefile using the entered options.\n```console\n Usage:\n\tbuild.sh \u003coptions\u003e\n\n options:\n\t-d [device]\t     select target device: m1\n\t-m [module]\t     select PCIe module: deepx xilinx\n\t-k [kernel dir]\t 'KERNEL_DIR=[kernel dir]', The directory where the kernel source is located\n\t\t\t         default: /lib/modules/5.15.0-100-generic/build)\n\t-a [arch]\t     set 'ARCH=[arch]' Target CPU architecture for cross-compilation, default: x86_64\n\t-t [cross tool]\t 'CROSS_COMPILE=[cross tool]' cross compiler binary, e.g aarch64-linux-gnu-\n\t-i [install dir] 'INSTALL_MOD_PATH=[install dir]', module install directory\n\t\t\t         install to: [install dir]/lib/modules/[KERNELRELEASE]/extra/\n\t-c [command]\t clean | install\n\t-j [jobs]\t     set build jobs\n\t-v\t\t         verbose (V=1)\n```\n\n***Modules***\n- modules/rt -\u003e dxrt_driver.ko\n- modules/pci_deepx -\u003e dx_dma.ko\n\n## Build\nYou can build with the make(Makefile) or build.sh script.\n\n### Compile : Makefile\nIf your target system is capable of self-compiling the Linux Kernel module, you can compile it with:\n\n***build***\n```console\ne.g $ cd modules\ne.g $ make DEVICE=m1 PCIE=deepx\n```\n\n***clean***\n```console\ne.g $ cd modules\ne.g $ make DEVICE=m1 PCIE=deepx clean\n```\n\n***install***\n- installed to : /lib/modules/$(KERNELRELEASE)/extra/\n```console\ne.g $ cd modules\ne.g $ make DEVICE=m1 PCIE=deepx install\n```\n\n### Cross Compile : Makefile\nIf you have a cross-compilation environment for target system, you can compile with:\n\n***build***\n```console\ne.g $ cd modules\ne.g $ make DEVICE=m1 PCIE=deepx \\\n      ARCH=arm64 CROSS_COMPILE=\u003cpath\u003e/aarch64-linux-gnu- \\\n\t  KERNEL_DIR=/home/fpga/src/linux-5.15.120-generic\n```\n\n***clean***\n```console\ne.g $ cd modules\ne.g $ make DEVICE=m1 PCIE=deepx \\\n      ARCH=arm64 CROSS_COMPILE=\u003cpath\u003e/aarch64-linux-gnu- \\\n\t  KERNEL_DIR=/home/fpga/src/linux-5.15.120-generic \\\n\t  clean\n```\n\n***install***\n- installed to : [path]/lib/modules/$(KERNELRELEASE)/extra/\n```console\ne.g $ cd modules\ne.g $ make DEVICE=m1 PCIE=deepx \\\n      ARCH=arm64 CROSS_COMPILE=\u003cpath\u003e/aarch64-linux-gnu- \\\n\t  KERNEL_DIR=/home/fpga/src/linux-5.15.120-generic \\\n\t  INSTALL_MOD_PATH=\u003cpath\u003e install\n```\n### Compile : build.sh\nIf your target system is capable of self-compiling the Linux Kernel module, you can compile it with:\n- defulat target device is 'm1' and submodule is 'deepx', you can select target device '-d [device]'\n\n***build***\n- Build m1 with submodule deepx : make DEVICE=m1 PCIE=deepx\n```console\ne.g $ ./build.sh\n```\n- Build m1 with submodule xilinx : make DEVICE=m1 PCIE=xilinx\n```console\ne.g $ ./build.sh -d m1 -m xilinx\n```\n***clean***\n```console\ne.g $ ./build.sh -c clean\n```\n\n***install***\n- installed to : /lib/modules/$(KERNELRELEASE)/extra/\n```console\ne.g $ sudo ./build.sh -c install\n```\n\n### Cross Compile : build.sh\nIf you have a cross-compilation environment for target system, you can compile with:\n- defulat target device is 'm1' and submodule is 'deepx', you can select target device '-d [device]'\n- Cross compilation can be built by specifying options when executing the script or modifying the script file.\n\n***modify script***\n- $ vi build.sh\n```console\nBUILD_DEFAULT_DEVICE=\"m1\"\nBUILD_DEFAULT_PCIE=\"deepx\"\nBUILD_DEFAULT_KERNEL_DIR=\"\"\nBUILD_DEFAULT_ARCH=\"\"\nBUILD_DEFAULT_CROSS_COMPILE=\"\"\nBUILD_DEFAULT_INSTALL_DIR=\"\"\n```\n- 'BUILD_DEFAULT_DEVICE' is equivalent to the '-d [device]' option.\n- 'BUILD_DEFAULT_PCIE' is equivalent to the '-m [module]' option.\n- 'BUILD_DEFAULT_KERNEL_DIR' is equivalent to the '-k [kernel dir]' option.\n- 'BUILD_DEFAULT_ARCH' is equivalent to the '-a [arch]' option.\n- 'BUILD_DEFAULT_CROSS_COMPILE' is equivalent to the '-t [cross tool]' option.\n- 'BUILD_DEFAULT_INSTALL_DIR' is equivalent to the '-i [install dir]' option.\n\n***build***\n```console\ne.g $ ./build.sh -a arm64 \\\n      -t \u003cpath\u003e/aarch64-linux-gnu- \\\n\t  -k /home/fpga/src/linux-5.15.120-generic\n```\n\n***clean***\n```console\ne.g $ ./build.sh -a arm64 \\\n      -t \u003cpath\u003e/aarch64-linux-gnu- \\\n\t  -k /home/fpga/src/linux-5.15.120-generic -c clean\n```\n\n***install***\n- installed to : [path]/lib/modules/$(KERNELRELEASE)/extra/\n```console\ne.g $ sudo ./build.sh -a arm64 \\\n      -t \u003cpath\u003e/aarch64-linux-gnu- \\\n\t  -k /home/fpga/src/linux-5.15.120-generic -c install\n```\n\n## Auto Loading modules at Boot time\nYou can install manually or use the build.sh script to have the module load automatically at boot time.\n\n### Manually\n***install***\n- installed to : /lib/modules/$(KERNELRELEASE)/extra/\n```console\n$ make DEVICE=m1 PCIE=deepx install\n```\n***modules.dep***\n- update : /lib/modules/$(KERNELRELEASE)/modules.dep\n```console\n$ sudo depmod -A\n```\n***/etc/modprobe.d/[modules].conf***\n- copy modules/dx_dma.conf to /etc/modprobe.d\n```console\n$ sudo cp modules/dx_dma.conf /etc/modprobe.d/\n```\n***test with modprobe***\n- You can verify that it was installed correctly with the modprobe command.\n```console\n$ sudo modprobe dx_dma\n$ lsmod\n  dxrt_driver            40960  0\n  dx_dma                176128  1 dxrt_driver\n```\n\n### build.sh script\n***install***\n- Handles all commands that need to be installed manually.\n```console\n$ ./build.sh -d m1 -m deepx -c install\n- DEVICE        : m1\n- PCIE          : deepx\n- MODULE CONF   : /home/jhk/deepx/dxrt/module/rt_npu_linux_driver/modules/dx_dma.conf\n- ARCH (HOST)   : x86_64\n- KERNEL        : /lib/modules/5.15.0-102-generic/build\n- INSTALL       : /lib/modules/5.15.0-102-generic/extra/\n\n *** Build : install ***\n $ make DEVICE=m1 PCIE=deepx install\n\nmake -C /lib/modules/5.15.0-102-generic/build M=/home/jhk/deepx/dxrt/module/rt_npu_linux_driver/modules  modules_install\n ....\n - SUCCESS\n\n *** Update : /lib/modules/5.15.0-102-generic/modules.dep ***\n $ depmod -A\n $ cp /home/jhk/deepx/dxrt/module/rt_npu_linux_driver/modules/dx_dma.conf /etc/modprobe.d/\n```\n***uninstall***\n- Remove all installed modules files.\n```console\n$ ./build.sh -d m1 -m deepx -c uninstall\n- DEVICE        : m1\n- PCIE          : deepx\n- MODULE CONF   : /home/jhk/deepx/dxrt/module/rt_npu_linux_driver/modules/dx_dma.conf\n- ARCH (HOST)   : x86_64\n- KERNEL        : /lib/modules/5.15.0-102-generic/build\n- INSTALL       : /lib/modules/5.15.0-102-generic/extra/\n\n *** Remove : /lib/modules/5.15.0-102-generic/extra ***\n $ rm -rf /lib/modules/5.15.0-102-generic/extra/pci_deepx\n $ rm -rf /lib/modules/5.15.0-102-generic/extra/rt\n\n *** Remove : /etc/modprobe.d ***\n $ rm /etc/modprobe.d/dx_dma.conf\n\n *** Update : /lib/modules/5.15.0-102-generic/modules.dep ***\n $ depmod\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepx-ai%2Fdx_rt_npu_linux_driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepx-ai%2Fdx_rt_npu_linux_driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepx-ai%2Fdx_rt_npu_linux_driver/lists"}