-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ucb-bar/build-system
ADD: improve build system
- Loading branch information
Showing
27 changed files
with
277 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Running C tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build-x86: | ||
# Do not ignore bash profile files. From: | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Clean previous builds | ||
run: | | ||
rm -rf ./build/ | ||
- name: Configure CMake | ||
run: | | ||
cmake . -S ./ -B ./build/ -D CMAKE_BUILD_TYPE=Debug | ||
- name: Build | ||
run: | | ||
cmake --build ./build/ --target tests | ||
./build/tests/tests | ||
- name: Run binary | ||
run: | | ||
./build/tests/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Tensor Creation | ||
|
||
A set of factory functions are available for creating a tensor object. These factory functions configure the shape, data type, device and other properties of the new tensor, and optionally populate them according to specific algorithms. | ||
|
||
## Factory Functions | ||
|
||
A *factory function* is a function that produces a new tensor. There are many factory functions available, which differ in the way they initialize a new tensor before returning it. All factory functions adhere to the following general “schema”: | ||
|
||
```c | ||
Tensor *NN_<function-name>(<ndim>, <shape>, <datatype>, <tensor-options>) | ||
``` | ||
|
||
### Available Factory Functions | ||
|
||
The following factory functions are available at the time of this writing: | ||
|
||
**tensor**: Returns a tensor with uninitialized values or preallocated buffer. | ||
|
||
**zeros**: Returns a tensor filled with all zeros. | ||
|
||
**ones**: Returns a tensor filled with all ones. | ||
|
||
**full**: Returns a tensor filled with a single value. | ||
|
||
**rand**: Returns a tensor filled with values drawn from a uniform distribution on [0, 1). | ||
|
||
**randint**: Returns a tensor with integers randomly drawn from an interval. | ||
|
||
**arange**: Returns a tensor with a sequence of integers. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_subdirectory(fast-depth) | ||
add_subdirectory(llama2) | ||
add_subdirectory(stereo-block-matching) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.