Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: use bazelisk instead of bazel in instructions #1003

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
https://brew.sh/

# Install dependencies
# Be aware, brew may install a newer version of bazel, when that happens bazel will give an error message during build.
# Please follow instructions in the error message to install the required version
brew install bazelisk cmake ninja libomp wget

Expand All @@ -90,13 +89,13 @@ brew install nasm
# build and test spu python bindings and applicatons
####################################################
# build as debug
bazel build //... -c dbg
bazelisk build //... -c dbg

# build as release
bazel build //... -c opt
bazelisk build //... -c opt

# test
bazel test //...
bazelisk test //...


############################################
Expand All @@ -105,17 +104,17 @@ bazel test //...
cd src

# build as debug
bazel build //... -c dbg
bazelisk build //... -c dbg

# build as release
bazel build //... -c opt
bazelisk build //... -c opt

# test
bazel test //...
bazelisk test //...

# [optional] build & test with ASAN or UBSAN, for macOS users please use configs with macOS prefix
bazel test //... --features=asan
bazel test //... --features=ubsan
bazelisk test //... --features=asan
bazelisk test //... --features=ubsan
```

### Bazel build options
Expand Down
10 changes: 5 additions & 5 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ pip install spu
- At the root of repo, run

```bash
bazel build //:spu_wheel -c opt
bazelisk build //:spu_wheel -c opt
pip install bazel-bin/spu-*.whl --force-reinstall
```

- Once GCC/bazel/python/Xcode version or other environment settings have changed, please run the following command to ensure a clean build

```bash
bazel clean --expunge
bazelisk clean --expunge
```

#### Build with GPU support

```bash
bazel build //:spu_wheel -c opt --config=gpu
bazelisk build //:spu_wheel -c opt --config=gpu
```

#### Build with specified python version

```bash
# build with python 3.10
bazel build //:spu_wheel -c opt --@rules_python//python/config_settings:python_version=3.10
bazelisk build //:spu_wheel -c opt --@rules_python//python/config_settings:python_version=3.10

# build with python 3.11
bazel build //:spu_wheel -c opt --@rules_python//python/config_settings:python_version=3.11
bazelisk build //:spu_wheel -c opt --@rules_python//python/config_settings:python_version=3.11
```
Loading