Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
CongMa13 committed Dec 8, 2023
1 parent 12b90c9 commit 67fbad0
Showing 1 changed file with 71 additions and 27 deletions.
98 changes: 71 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Optional:

Run the steps below to build documentation locally.

```shell
```bash
cd docs

pip3 install -r .sphinx/requirements.txt
Expand All @@ -38,15 +38,36 @@ python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html

## Currently supported

Operations - Contraction Tensor
Data Types - FP32 , FP64
### Operations - Contraction Tensor

Supported data-type combinations are:

| typeA | typeB | typeC | typeCompute | notes |
|-----------|-----------|-----------|-----------------|----------------------------------|
| bf16 | bf16 | bf16 | f32 | |
| __half | __half | __half | f32 | |
| f32 | f32 | f32 | bf16 | |
| f32 | f32 | f32 | __half | |
| f32 | f32 | f32 | f32 | |
| f64 | f64 | f64 | f32 | f64 is supported only on gfx90 + |
| f64 | f64 | f64 | f64 | f64 is supported only on gfx90 + |

### Operations - Permutation Tensor

Supported data-type combinations are:

| typeA | typeB | descCompute | notes |
|-----------|-----------|-----------------|-------|
| f16 | f16 | f16 | |
| f16 | f16 | f32 | |
| f32 | f32 | f32 | |

## Contributing to the code

1. Create and track a hipTensor fork.
2. Clone your fork:

```shell
```bash
git clone -b develop https://github.com/<your_fork>/hipTensor.git .
.githooks/install
git checkout -b <new_branch>
Expand All @@ -69,22 +90,22 @@ git push origin <new_branch>

### Project options

|Option|Description|Default Value|
|---|---|---|
|AMDGPU_TARGETS|Build code for specific GPU target(s)|gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942|
|HIPTENSOR_BUILD_TESTS|Build Tests|ON|
|HIPTENSOR_BUILD_SAMPLES|Build Samples|ON|
| Option | Description | Default Value |
|-------------------------|---------------------------------------|----------------------------------------------------------------|
| AMDGPU_TARGETS | Build code for specific GPU target(s) | gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942 |
| HIPTENSOR_BUILD_TESTS | Build Tests | ON |
| HIPTENSOR_BUILD_SAMPLES | Build Samples | ON |

### Example configurations

By default, the project is configured as Release mode.
Here are some of the examples for the configuration:
|Configuration|Command|
|---|---|
|Basic|`CC=hipcc CXX=hipcc cmake -B<build_dir> .`|
|Targeting gfx908|`CC=hipcc CXX=hipcc cmake -B<build_dir> . -DAMDGPU_TARGETS=gfx908:xnack-` |
|Debug build|`CC=hipcc CXX=hipcc cmake -B<build_dir> . -DCMAKE_BUILD_TYPE=Debug` |
|Build without tests (default on)|`CC=hipcc CXX=hipcc cmake -B<build_dir> . -DHIPTENSOR_BUILD_TESTS=OFF` |
| Configuration | Command |
|----------------------------------|---------------------------------------------------------------------------|
| Basic | `CC=hipcc CXX=hipcc cmake -B<build_dir> .` |
| Targeting gfx908 | `CC=hipcc CXX=hipcc cmake -B<build_dir> . -DAMDGPU_TARGETS=gfx908:xnack-` |
| Debug build | `CC=hipcc CXX=hipcc cmake -B<build_dir> . -DCMAKE_BUILD_TYPE=Debug` |
| Build without tests (default on) | `CC=hipcc CXX=hipcc cmake -B<build_dir> . -DHIPTENSOR_BUILD_TESTS=OFF` |

After configuration, build with `cmake --build <build_dir> -- -j<nproc>`

Expand All @@ -98,40 +119,63 @@ After configuration, build with `cmake --build <build_dir> -- -j<nproc>`
### Logger tests

Tests API implementation of logger verbosity and functionality.
o <build_dir>/bin/logger_test
```bash

Check failure on line 122 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:122 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/logger_test
```

## Running Contraction Tests

### Bilinear contraction tests

Tests the API implementation of bilinear contraction algorithm with validation.
o <build_dir>/bin/bilinear_contraction_f32_test
o <build_dir>/bin/bilinear_contraction_f64_test
```bash

Check failure on line 131 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:131 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/bilinear_contraction_test
```

### Scale contraction tests

Tests the API implementation of scale contraction algorithm with validation.
o <build_dir>/bin/scale_contraction_f32_test
o <build_dir>/bin/scale_contraction_f64_test
```bash

Check failure on line 138 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:138 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/scale_contraction_test
```

### Samples
## Running Permutation Tests

### Permutation tests

Check failure on line 144 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Headings should be surrounded by blank lines

README.md:144 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### Permutation tests"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md022.md
Tests API implementation of permutation algorithm with validation.
```bash

Check failure on line 146 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:146 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/permutation_test
```

## Samples

These are stand-alone use-cases of the hipTensor contraction operations.

## F32 Bilinear contraction
### F32 Bilinear contraction

Demonstrates the API implementation of bilinear contraction operation without validation.
o <build_dir>/bin/simple_contraction_bilinear_f32
```bash

Check failure on line 157 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:157 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/simple_bilinear_contraction_<typeA>_<typeB>_<typeC>_<typeD>_compute_<computeType>
```

## F32 Scale contraction
### F32 Scale contraction

Demonstrates the API implementation of scale contraction operation without validation.
o <build_dir>/bin/simple_contraction_scale_f32
```bash

Check failure on line 164 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:164 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/simple_scale_contraction_<typeA>_<typeB>_<typeD>_compute_<typeCompute>
```

### Permutation

Demonstrates the API implementation of permutation operation without validation.
```bash

Check failure on line 171 in README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Fenced code blocks should be surrounded by blank lines

README.md:171 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md031.md
<build_dir>/bin/simple_permutation
```

### Build Samples as external client

Client application links to hipTensor library,
and therefore hipTensor library needs to be installed before building client applications.
Client application links to hipTensor library, and therefore hipTensor library
needs to be installed before building client applications.

## Build

Expand Down

0 comments on commit 67fbad0

Please sign in to comment.