Skip to content

Move documentation docs top level folder #584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 24, 2022
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This project contains the MLPerf mobile app, an app-based implementation of
[MLPerf Inference](https://github.com/mlperf/inference) tasks.

**Table of Contents**:
## Table of Contents

* [Overview](#overview)
* [Folder Structure](#folder-structure)
Expand Down Expand Up @@ -47,15 +47,15 @@ frameworks contributed by the broader MLPerf community.

## Folder Structure

* flutter - Contains the Flutter (cross-platform) version of the app
* mobile_back_qti - QTI backend for Android
* mobile_back_samsung - Samsung backend for Android
* mobile_back_pixel - Google Pixel backend for Android
* mobile_back_tflite - Combined TFLite / MediaTek backends for Android and TFLite backend for iOS
* mobile_back_apple - Apple backend (Core ML) for iOS
* datasets - Contains scripts to prepare test and calibration data used for accuracy evaluation and model quantization
* docs - contains documentation
* tools - contains miscellaneous tools (e.g. formatting commands, code scanner)
* [datasets](./datasets) - Contains scripts to prepare test and calibration data used for accuracy evaluation and model quantization
* [docs](./docs) - contains documentation
* [flutter](./flutter) - Contains the Flutter (cross-platform) version of the app
* [mobile_back_apple](./mobile_back_apple) - Apple backend (Core ML) for iOS
* [mobile_back_pixel](./mobile_back_pixel) - Google Pixel backend for Android
* [mobile_back_qti](./mobile_back_qti) - QTI backend for Android
* [mobile_back_samsung](./mobile_back_samsung) - Samsung backend for Android
* [mobile_back_tflite](./mobile_back_tflite) - Combined TFLite / MediaTek backends for Android and TFLite backend for iOS
* [tools](./tools) - contains miscellaneous tools (e.g. formatting commands, code scanner)

## Related Repositories

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,19 @@ Set `backend_<vendor>_android_target` to appropriate value for your build system
You will need to do few things:

* Include your `<vendor>_backend.mk` into the root makefile.
* Add new line with your `<VENDOR>_TAG` into [list.in](../lib/backend/list.in).
* Add new line with your `<VENDOR>_TAG` into [list.in](../flutter/lib/backend/list.in).
Note that order is important in this file. Backends are evaluated in the order they are defined, and the app never checks backends after TFLite.
Place your tag before TFLite tag.
* Add line to substitute this tag with the actual name of your backend lib into [flutter.mk](../flutter.mk) in the `flutter/backend-list` make target
* Add line to substitute this tag with the actual name of your backend lib into [flutter.mk](../flutter/flutter.mk) in the `flutter/backend-list` make target
* Add commands to build your backend when `WITH_<VENDOR>=1` make variable is supplied.
Modify `flutter/android/libs` ([android.mk](../android/android.mk)) or `flutter/windows/libs` ([windows.mk](../windows/windows.mk)), depending on your platform:
Modify `flutter/android/libs` ([android.mk](../flutter/android/android.mk))
or `flutter/windows/libs` ([windows.mk](../flutter/windows/windows.mk)), depending on your platform:
* If you use bazel as your build system, just add a line `${backend_<vendor>_android_target}` into appropriate position
* If you use different build system, add a condition to only build your backend when `WITH_<VENDOR>=1` is defined.
* Add a line `${backend_<vendor>_android_files}` into the copy command
* Add a line `${backend_<vendor>_android_files}` into the `copy` command

## Implementing backend interface

Backend C API is defined in [flutter/cpp/c/backend_c.h](../../flutter/cpp/c/backend_c.h).
Backend C API is defined in [flutter/cpp/c/backend_c.h](../flutter/cpp/c/backend_c.h).
Unfortunately, we don't have any documentation on details of how to implement it yet.
You can look at the [reference TFLite backend implementation](../../mobile_back_tflite) for hints or create an issue if something is not clear.
You can look at the [reference TFLite backend implementation](../mobile_back_tflite) for hints or create an issue if something is not clear.
2 changes: 1 addition & 1 deletion docs/build_and_release.md → docs/build-and-release.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build and Release
# Build and Release Rules

## Build artifacts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,17 @@ You can run `make flutter/build-info` manually before you do hot reload to updat
[comment]: # (TODO add information about using Android emulators)

On Linux command `make flutter` builds native libs automatically.
See [Android environment setup guide](./env-setup-android.md#setting-up-the-environment-on-ubuntu).
See [Android environment setup guide](./environment-setup/env-setup-android.md#setting-up-the-environment-on-ubuntu).

On macOS `make flutter` will try to build native libs for iOS. Run `make flutter/android` to build android libs on macOS.
Unfortunately, there is no complete environment setup guide for now.
See [macOS guide](./env-setup-ios.md#setting-up-the-environment) for general setup and [Ubuntu guide](./env-setup-android.md#setting-up-the-environment-on-ubuntu) for android-specific parts.
See [macOS guide](./environment-setup/env-setup-ios.md#setting-up-the-environment) for general setup
and [Ubuntu guide](./environment-setup/env-setup-android.md#setting-up-the-environment-on-ubuntu) for android-specific parts.

On Windows building libs for Android is not available.
You can copy `.so` files from some Linux or macOS system, then run `make flutter/prepare`, and then run Flutter commands locally.
For example, it's relatively convenient to use WSL to build native libs.
See [Windows environment setup guide](./env-setup-windows.md#setting-up-the-environment) to set up your system to run Flutter.
See [Windows environment setup guide](./environment-setup/env-setup-windows.md#setting-up-the-environment) to set up your system to run Flutter.

Run `make OFFICIAL_BUILD=false FLUTTER_BUILD_NUMBER=0 flutter/android/release` to build APK from scratch,
or run `make flutter/android/apk` after `make flutter/prepare` and you already have native libs.
Expand All @@ -129,7 +130,7 @@ rm -f flutter/android/gradle/wrapper/gradle-wrapper.jar

Building for iOS is available only on macOS.

See [iOS environment setup guide](./env-setup-ios.md#setting-up-the-environment).
See [iOS environment setup guide](./environment-setup/env-setup-ios.md#setting-up-the-environment).

If you want to run the app on a real device, you have to change settings in XCode:

Expand Down Expand Up @@ -160,7 +161,7 @@ Run `make OFFICIAL_BUILD=false FLUTTER_BUILD_NUMBER=0 flutter/ios/release` to cr

Building for Windows is available only on Windows.

See [Windows environment setup guide](./env-setup-windows.md#setting-up-the-environment).
See [Windows environment setup guide](./environment-setup/env-setup-windows.md#setting-up-the-environment).

On Windows it's pretty easy to use Visual Studio debugger for native libs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ The `benchmarksConfigurations.json` looks like this:
See [How to specify a resource](#how-to-specify-a-resource) for details on how to specify a path to the config.

The `tasks.pbtxt` file is a text file in [protobuf](https://developers.google.com/protocol-buffers) format.
The format specification for this app is [here](../cpp/proto/mlperf_task.proto).
The easiest way to create a custom config is to copy and modify [the default config](../assets/tasks.pbtxt).
The format specification for this app is [here](../flutter/cpp/proto/mlperf_task.proto).
The easiest way to create a custom config is to copy and modify [the default config](../flutter/assets/tasks.pbtxt).

After adding new option into the `benchmarksConfigurations.json` file
run application and open setting screen.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Android environment setup guide

This file describes how to setup the environment for Android builds on Ubuntu.
This file describes how to setup the environment for Android builds.

Android native libs can not be built on Windows.
If you use Windows as your primary build system you will have to use a helper linux or macos system to build libs.
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Documentation overview

This folder contains most of the documentation files. Documentation contains mostly development instructions.

Refer to the [root README file](../README.md) for general overview of the repo.

## Table of Contents

* [Build and Release Rules](./build-and-release.md)
* [Glossary](./glossary.md)
* [Environment setup for Android builds](./environment-setup/env-setup-android.md)
* [Environment setup for iOS builds](./environment-setup/env-setup-ios.md)
* [Environment setup for Windows builds](./environment-setup/env-setup-windows.md)
* [Build and Run the app](./build-and-run.md)
* [Adding support for a new custom backend](./adding-custom-backend.md)
* [Using custom benchmark configuration](./custom-tasks.md)
* [Working with Firebase](./firebase.md)
* [Formal result specification](./result-spec.md)
File renamed without changes.
7 changes: 0 additions & 7 deletions flutter/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# flutter

This folder contains sources of Flutter version of the MLPerfBench application.

## Documentation

* [Building for app on different platforms](./documentation/build-and-run.md)
* [Using custom benchmark configuration](./documentation/custom-tasks.md)
* [Adding support for your custom backend](./documentation/adding-custom-backend.md)
* [Working with Firebase](./documentation/firebase.md)
2 changes: 1 addition & 1 deletion flutter/flutter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ flutter/result/test-sample:
make flutter/result/sample \
RESULT_JSON_SAMPLE_PATH=flutter_common/test/data/result_sample.json

default_result_json_schema_path=flutter/documentation/extended-result.schema.json
default_result_json_schema_path=tools/extended-result.schema.json
RESULT_JSON_SCHEMA_PATH?=${default_result_json_schema_path}
.PHONY: flutter/result/schema
flutter/result/schema: flutter/result/sample
Expand Down
2 changes: 1 addition & 1 deletion website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
This folder contains files for the Flutter Web Single Page Application
that provides access to the online database of results from the MLPerfBench benchmark.

See [documentation](../flutter/documentation/firebase.md#developing-website) for details about developing and deploying the website.
See [documentation](../docs/firebase.md#developing-website) for details about developing and deploying the website.