Skip to content

Commit b269617

Browse files
committed
Move GPU and NPU configuration instructions to HACKING.md
1 parent 9e0cb96 commit b269617

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

HACKING.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,45 @@ Note that if your conan profile does not specify the same compiler, standard
110110
level, build type and runtime library as CMake, then that could potentially
111111
cause issues. See the link above for profiles documentation.
112112

113-
An example Android profile is bundled with this repository. Install it to
114-
your local conan prefix using:
113+
[conan]: https://conan.io/
114+
[profile]: https://docs.conan.io/2/reference/config_files/profiles.html
115+
116+
#### Android
117+
118+
An example Android profile is bundled with this repository. It can be installed
119+
to your local conan prefix using:
115120

116121
```sh
117122
conan config install profiles -tf profiles
118123
```
119124

120-
and invoke it with `-pr android` in your `conan install` invocation.
121-
122-
[conan]: https://conan.io/
123-
[profile]: https://docs.conan.io/2/reference/config_files/profiles.html
125+
Use it by adding `-pr android` to your `conan install` invocation.
126+
127+
#### GPU
128+
129+
For GPU support add `-o gpu=True` to the `conan install` invocation.
130+
> [!NOTE]
131+
> The tensorflow-lite conan package disables GPU by default and as such these
132+
steps will not work currently. I have patched the recipe locally to enable GPU
133+
support and will make this available on Conan Center or another repository
134+
soon. In the mean time, my custom recipe can be be used as outlined
135+
[here](https://github.com/neuralize-ai/tensorflow-lite-conan). If you have
136+
previously `conan install`ed, remove the existing TFLite package(s) using
137+
`conan remove "tensorflow-lite"`. Make sure to create the TFLite package
138+
version that is required in [conanfile](/conanfile.py).
139+
140+
GPU support requires a functioning OpenCL installation. Refer to your OS
141+
documentation for the steps for setting this up correctly for your GPU vendor.
142+
143+
#### NPU
144+
145+
There is support for executing on Qualcomm NPUs (more hardware support is
146+
upcoming). Since this involves using Qualcomm's pre-compiled shared libraries,
147+
I have created a Conan recipe that must be used
148+
[here](https://github.com/neuralize-ai/qnn-conan). Follow the instructions on
149+
that repository and the steps above with `-o with_npu=True` supplied to the
150+
`conan install` invocation. Make sure to create the package version required
151+
in [conanfile](/conanfile.py).
124152

125153
### Configure, build and test
126154

example/README.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,7 @@ For MacOS, replace "Unix Makefiles" with "Xcode".
3939
> Examples require additional dependencies to the main library. As such, it is
4040
required to supply `-o examples=True` to the `conan install` command.
4141

42-
In the examples below, for GPU support add `-o gpu=True` to the `conan install` command.
43-
> [!NOTE]
44-
> The tensorflow-lite conan package disables GPU by default and as such these
45-
steps will not work currently. I have patched the recipe locally to enable GPU
46-
support and will make this available on Conan Center or another repository
47-
soon. In the mean time, my custom recipe can be be used as outlined
48-
[here](https://github.com/neuralize-ai/tensorflow-lite-conan). If you have
49-
previously `conan install`ed, remove the existing TFLite package(s) using
50-
`conan remove "tensorflow-lite"`. Make sure to create the TFLite package
51-
version that is required in [conanfile](/conanfile.py).
52-
53-
GPU support requires a functioning OpenCL installation. Refer to your OS
54-
documentation for the steps for setting this up correctly for your GPU vendor.
42+
Refer to [HACKING](/HACKING.md) for further configuration options.
5543

5644
## Unix
5745

@@ -118,11 +106,3 @@ cmake --build --preset=rel -t run_<example_name>
118106
```
119107

120108
where `example_name` is the example filename without the extension (eg. `mobilenet_v3_small`).
121-
122-
There is support for executing on Qualcomm NPUs (more hardware support is
123-
upcoming). Since this involves using Qualcomm's pre-compiled shared libraries,
124-
I have created a Conan recipe that must be used
125-
[here](https://github.com/neuralize-ai/qnn-conan). Follow the instructions on
126-
that repository and the steps above with `-o with_npu=True` supplied to the
127-
`conan install` invocation. Make sure to create the package version required
128-
in [conanfile](/conanfile.py).

0 commit comments

Comments
 (0)