Skip to content
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

Big documentation update #8410

Merged
merged 33 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0461833
Move top-level README_*.md to doc/
alexreinking Sep 4, 2024
f2a3ea5
Split CMake.md into three documents; update them
alexreinking Sep 5, 2024
9134afe
Update README.md
alexreinking Sep 5, 2024
d6a3ac1
Format README.md
alexreinking Sep 5, 2024
40e2000
Tidy up top-level references
alexreinking Sep 5, 2024
069b9b1
Move CMake first, fuse small sections into the prose they annotate.
alexreinking Sep 5, 2024
ba8eab2
Move Hexagon into its own doc
alexreinking Sep 5, 2024
4e6befe
Overhaul the building instructions
alexreinking Sep 5, 2024
f84006b
Update information about package managers.
alexreinking Sep 5, 2024
8697419
More distro information
alexreinking Sep 5, 2024
eb82c74
Better file names
alexreinking Sep 5, 2024
103a6fd
Update ToC in doc/Python.md
alexreinking Sep 5, 2024
0da6968
Update Python documentation
alexreinking Sep 5, 2024
ce91257
Simplify ToC in CMake docs
alexreinking Sep 5, 2024
0a94228
Update references in CMake docs
alexreinking Sep 5, 2024
326481e
Drop Chocolatey references
alexreinking Sep 5, 2024
cb02ece
Reference
alexreinking Sep 5, 2024
14643d0
Update platform support tables.
alexreinking Sep 5, 2024
a1ef44c
Fix Visual Studio 2019 -> 2022
alexreinking Sep 5, 2024
9d3d847
Add warning that Make support is limited
alexreinking Sep 5, 2024
8e69aaa
Clarify HL_TARGET environment variable.
alexreinking Sep 5, 2024
5b79be6
Remove s390x and ppc64le columns
alexreinking Sep 5, 2024
b497d42
Fix explanation of LLVM version compatibility policy
alexreinking Sep 5, 2024
be6998c
Fix explanation of `WITH_PACKAGING`
alexreinking Sep 5, 2024
0e4bdb1
Fix RTTI/Exceptions explanation for LLVM builds that will be used by …
alexreinking Sep 5, 2024
6f5f0c3
Be more explicit that `pip` is a good way to get Halide binaries.
alexreinking Sep 5, 2024
6f663a2
Add link to nightly tarballs from buildbots.
alexreinking Sep 5, 2024
5857361
Replace "easy" with more inclusive language.
alexreinking Sep 5, 2024
7c5b8f9
Point users to our buildbot-produced LLVM Windows builds
alexreinking Sep 5, 2024
4a4e174
Caution users more about disk space requirements for vcpkg.
alexreinking Sep 5, 2024
a9f5f22
Rewrite buildbot advice for current UI
alexreinking Sep 5, 2024
0f21fd8
Typo in add_definitions
alexreinking Sep 5, 2024
93d1cd7
Make the Makefile warning more precise.
alexreinking Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
492 changes: 238 additions & 254 deletions README.md

Large diffs are not rendered by default.

1,411 changes: 0 additions & 1,411 deletions README_cmake.md

This file was deleted.

626 changes: 626 additions & 0 deletions doc/BuildingHalideWithCMake.md

Large diffs are not rendered by default.

393 changes: 393 additions & 0 deletions doc/CodeStyleCMake.md

Large diffs are not rendered by default.

File renamed without changes.
808 changes: 808 additions & 0 deletions doc/HalideCMakePackage.md

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions doc/Hexagon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Halide for Hexagon HVX

Halide supports offloading work to Qualcomm Hexagon DSP on Qualcomm Snapdragon
845/710 devices or newer. The Hexagon DSP provides a set of 128 byte vector
instruction extensions - the Hexagon Vector eXtensions (HVX). HVX is well suited
for image processing, and Halide for Hexagon HVX will generate the appropriate
HVX vector instructions from a program authored in Halide.

Halide can be used to compile Hexagon object files directly, by using a target
such as `hexagon-32-qurt-hvx`.

Halide can also be used to offload parts of a pipeline to Hexagon using the
`hexagon` scheduling directive. To enable the `hexagon` scheduling directive,
include the `hvx` target feature in your target. The currently supported
combination of targets is to use the HVX target features with an x86 linux
host (to use the simulator) or with an ARM android target (to use Hexagon DSP
hardware). For examples of using the `hexagon` scheduling directive on both the
simulator and a Hexagon DSP, see the blur example app.

To build and run an example app using the Hexagon target,

1. Obtain and build trunk LLVM and Clang. (Earlier versions of LLVM may work but
are not actively tested and thus not recommended.)
2. Download and install the Hexagon SDK and Hexagon Tools. Hexagon SDK 4.3.0 or
later is needed. Hexagon Tools 8.4 or later is needed.
3. Build and run an example for Hexagon HVX

## 1. Obtain and build trunk LLVM and Clang

(Follow the instructions given previously, just be sure to check out the `main`
branch.)

## 2. Download and install the Hexagon SDK and Hexagon Tools

Go to https://qpm.qualcomm.com/#/main/home

1. Go to Tools, and download Qualcomm Package Manager 3. Install the package
manager on your machine.
2. Run the installed Qualcomm Package Manager and install the Qualcomm Hexagon
SDK 5.x (or 4.x). The SDK can be selected from the Qualcomm Hexagon SDK
Products.
3. Set an environment variable to point to the SDK installation location
```
export SDK_LOC=/location/of/SDK
```

## 3. Build and run an example for Hexagon HVX

In addition to running Hexagon code on device, Halide also supports running
Hexagon code on the simulator from the Hexagon tools.

To build and run the blur example in Halide/apps/blur on the simulator:

```
cd apps/blur
export HL_HEXAGON_SIM_REMOTE=../../src/runtime/hexagon_remote/bin/v65/hexagon_sim_remote
export HL_HEXAGON_TOOLS=$SDK_LOC/Hexagon_Tools/8.x/Tools/
LD_LIBRARY_PATH=../../src/runtime/hexagon_remote/bin/host/:$HL_HEXAGON_TOOLS/lib/iss/:. HL_TARGET=host-hvx make test
```

## To build and run the blur example in Halide/apps/blur on Android:

To build the example for Android, first ensure that you have Android NDK r19b or
later installed, and the ANDROID_NDK_ROOT environment variable points to it.
(Note that Qualcomm Hexagon SDK v4.3.0 includes Android NDK r19c, which is
fine.)

Now build and run the blur example using the script to run it on device:

```
export HL_HEXAGON_TOOLS=$SDK_LOC/HEXAGON_Tools/8.4.11/Tools/
HL_TARGET=arm-64-android-hvx ./adb_run_on_device.sh
```
Loading