{"id":24369997,"url":"https://github.com/unikraft/lib-tflite","last_synced_at":"2025-04-10T17:33:33.368Z","repository":{"id":48078205,"uuid":"277904313","full_name":"unikraft/lib-tflite","owner":"unikraft","description":"Unikraft port of TensorFlow Lite","archived":false,"fork":false,"pushed_at":"2024-01-02T20:56:22.000Z","size":10,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"staging","last_synced_at":"2025-03-24T15:11:15.689Z","etag":null,"topics":["library","tensorflowlite","unikraft"],"latest_commit_sha":null,"homepage":"","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/unikraft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING.md","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}},"created_at":"2020-07-07T19:26:21.000Z","updated_at":"2023-10-20T17:10:27.000Z","dependencies_parsed_at":"2023-01-23T21:30:33.813Z","dependency_job_id":"4237a6f6-5ab4-489c-856c-8f9420d318a8","html_url":"https://github.com/unikraft/lib-tflite","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikraft%2Flib-tflite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikraft%2Flib-tflite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikraft%2Flib-tflite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unikraft%2Flib-tflite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unikraft","download_url":"https://codeload.github.com/unikraft/lib-tflite/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261995,"owners_count":21074229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["library","tensorflowlite","unikraft"],"created_at":"2025-01-19T04:11:43.409Z","updated_at":"2025-04-10T17:33:33.326Z","avatar_url":"https://github.com/unikraft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"TensorFlowLite for Unikraft\n=============================\n\nThis is the port of tensorflowlite as external library\nPlease refer to the `README.md` as well as the documentation in the `doc/`\nsubdirectory of the main unikraft repository.\n\n## Build\nTensorFlowLite interpreter depends on the following libraries, that need to\nbe added to `Makefile` in this order:\n\n* `pthreads`, e.g. `pthread-embedded`\n* `libcxx`\n* `libcxxabi`\n* `libc`, e.g. `newlib`\n* `libunwind`\n* `libcompilerrt`\n* `libgemmlowp`\n* `libflatbuffers`\n* `libfarmhash`\n* `libeigen`\n* `libfft2`\n\n## Root filesystem\n### Creating the filesystem\nTensorFlowLite needs a filesystem which should contain one or more *tflite*\nmodels. Therefore, the filesystem needs to be created before running the VM. \n\n### Using the filesystem\nMounting the filesystem is a transparent operation. All you have to do\nis to provide the right Qemu parameters in order for Unikraft to mount\nthe filesystem.  We will use the 9pfs support for filesystems and for\nthis you will need to use the following parameters:\n\n```bash\n-fsdev local,id=myid,path=\u003csome directory\u003e,security_model=none \\\n-device virtio-9p-pci,fsdev=myid,mount_tag=rootfs,disable-modern=on,disable-legacy=off\n```\nYou should also use `vfs.rootdev=rootfs` (set by default) to specify the 9pfs mounting\ntag to Unikraft. To enable 9pfs, you'll need to select the following\nmenu options, all under `Library Configuration` (this should be already done by the\n`tflite` config file):\n\n* `uk9p: 9p client`\n* `vfscore: VFS Core Interface`\n\t  \u0026rarr; `vfscore: Configuration`\n\t  \u0026rarr; `Automatically mount a root filesysytem`\n\t  \u0026rarr; `Default root filesystem`\n\t  \u0026rarr; `9PFS`\n\nAlternatively, and perhaps easier, is to use the qemu-guest script [here](https://github.com/unikraft/kraft/blob/master/scripts/qemu-guest):\n```bash\nkvm-guest -k build/helloworld_kvm-x86_64 -e rootfs -a \"vfs.rootdev=fs0 --\" -m 1024\n```\n\n## How to run\nCurrently, `main.cpp` contains a minimal example for loading a *tflite* model and\nprinting the interpreter state. The sample program will try to load the model from\n`mobilenet_v1_1.0_224.tflite` (this model and other models from the same family can\nbe downloaded from [here](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funikraft%2Flib-tflite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funikraft%2Flib-tflite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funikraft%2Flib-tflite/lists"}