Skip to content

Commit

Permalink
Merge pull request #175 from mkarunan/add-complex-f32-f64
Browse files Browse the repository at this point in the history
- Add complex f32 f64 for contraction
- Add f16, bf16, for contraction
  • Loading branch information
CongMa13 authored Jan 4, 2024
2 parents 1a1e678 + 348e281 commit 67e4545
Show file tree
Hide file tree
Showing 167 changed files with 11,270 additions and 2,944 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/docs/.sphinx" # Location of package manifests
directory: "/docs/sphinx" # Location of package manifests
open-pull-requests-limit: 10
schedule:
interval: "daily"
Expand Down
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,3 @@ build*
\#*\#
*~
*.log

# documentation artifacts
build/
_build/
_images/
_static/
_templates/
_toc.yml
docBin/
_doxygen/
6 changes: 2 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ formats: [htmlzip, pdf, epub]

python:
install:
- requirements: docs/.sphinx/requirements.txt
- requirements: docs/sphinx/requirements.txt

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.8"
apt_packages:
- "doxygen"
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Run the steps below to build documentation locally.
```shell
cd docs

pip3 install -r .sphinx/requirements.txt
pip3 install -r sphinx/requirements.txt

python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
```
Expand Down Expand Up @@ -98,21 +98,24 @@ 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

* `<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

* `<build_dir>/bin/bilinear_contraction_f32_test`
* `<build_dir>/bin/bilinear_contraction_f64_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

* `<build_dir>/bin/scale_contraction_f32_test`
* `<build_dir>/bin/scale_contraction_f64_test`

### Samples

Expand All @@ -121,12 +124,14 @@ These are stand-alone use-cases of the hipTensor contraction operations.
## F32 Bilinear contraction

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

* `<build_dir>/bin/simple_contraction_bilinear_f32`

## F32 Scale contraction

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

* `<build_dir>/bin/simple_contraction_scale_f32`

### Build Samples as external client

Expand Down
12 changes: 5 additions & 7 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.doxygen/docBin
.sphinx/_toc.yml
_build
_doxygen
_images
_static
_templates
doxygen/html
doxygen/xml
sphinx/_toc.yml
_build/
_doxygen/
1 change: 0 additions & 1 deletion docs/.sphinx/requirements.in

This file was deleted.

7 changes: 5 additions & 2 deletions docs/API_Reference_Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
Introduction
************

hiptensor Data Types
hipTensor Data Types
====================

.. <!-- spellcheck-disable -->
hiptensorStatus_t
-----------------

.. doxygenenum:: hiptensorStatus_t


hiptensorComputeType_t
----------------------

Expand Down Expand Up @@ -160,3 +161,5 @@ hiptensorLoggerForceDisable
---------------------------

.. doxygenfunction:: hiptensorLoggerForceDisable

.. <!-- spellcheck-enable -->
27 changes: 13 additions & 14 deletions docs/Contributors_Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ License Agreement
Pull-request guidelines
=======================


Our code contriubtion guidelines closely follows the model of `GitHub
Our code contribution guidelines closely follows the model of `GitHub
pull-requests <https://help.github.com/articles/using-pull-requests/>`__.
The hipTensor repository follows a workflow which dictates a /master branch where releases are cut, and a
/develop branch which serves as an integration branch for new code. Pull requests should:
Expand All @@ -30,8 +29,8 @@ The hipTensor repository follows a workflow which dictates a /master branch wher
- code must also have benchmark tests, and performance must approach
the compute bound limit or memory bound limit.

StyleGuide
==========
Style Guide
===========

This project follows the `CPP Core
guidelines <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md>`__,
Expand All @@ -44,16 +43,16 @@ Interface
---------

- Library code should use C++17
- Avoid CamelCase
- Avoid Camel case
- This rule applies specifically to publicly visible APIs, but is also
encouraged (not mandated) for internal code

Philosophy
----------

- `P.2 <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rp-Cplusplus>`__:
Write in ISO Standard C++14 (especially to support windows, linux and
macos plaforms )
Write in ISO Standard C++14 (especially to support Windows, Linux and
macOS platforms )
- `P.5 <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rp-compile-time>`__:
Prefer compile-time checking to run-time checking

Expand Down Expand Up @@ -105,19 +104,19 @@ will result in different results.

To format a file, use:

::
.. code-block::
/opt/rocm/llvm/bin/clang-format -style=file -i <path-to-source-file>
/opt/rocm/llvm/bin/clang-format -style=file -i <path-to-source-file>
To format all files, run the following script in hipTensor directory:

::
.. code-block::
#!/bin/bash
git ls-files -z *.cc *.cpp *.h *.hpp *.cl *.h.in *.hpp.in *.cpp.in | xargs -0 /opt/rocm/llvm/bin/clang-format -style=file -i
#!/bin/bash
git ls-files -z *.cc *.cpp *.h *.hpp *.cl *.h.in *.hpp.in *.cpp.in | xargs -0 /opt/rocm/llvm/bin/clang-format -style=file -i
Also, githooks can be installed to format the code per-commit:

::
.. code-block::
./.githooks/install
./.githooks/install
29 changes: 15 additions & 14 deletions docs/Linux_Install_Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ Minimum ROCm version support is 5.7.

By default, the project is configured as Release mode.

To build only library, run the following comomand :
To build only library, run the following command :

CC=hipcc CXX=hipcc cmake -B<build_dir> . -DHIPTENSOR_BUILD_TESTS=OFF -DHIPTENSOR_BUILD_SAMPLES=OFF
:code:`CC=hipcc CXX=hipcc cmake -B<build_dir> . -DHIPTENSOR_BUILD_TESTS=OFF -DHIPTENSOR_BUILD_SAMPLES=OFF`

Here are some other example project configurations:

Expand All @@ -116,30 +116,30 @@ Here are some other example project configurations:
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------+
| Configuration | Command |
+===================================+====================================================================================================================+
| Basic | CC=hipcc CXX=hipcc cmake -B<build_dir> . |
| Basic | :code:`CC=hipcc CXX=hipcc cmake -B<build_dir> .` |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------+
| Targeting gfx908 | CC=hipcc CXX=hipcc cmake -B<build_dir> . -DAMDGPU_TARGETS=gfx908:xnack- |
| Targeting gfx908 | :code:`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 |
| Debug build | :code:`CC=hipcc CXX=hipcc cmake -B<build_dir> . -DCMAKE_BUILD_TYPE=Debug` |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------+

After configuration, build with

cmake --build <build_dir> -- -j
:code:`cmake --build <build_dir> -- -j`


Build library + samples
^^^^^^^^^^^^^^^^^^^^^^^

To build library and samples, run the following comomand :
To build library and samples, run the following command:

CC=hipcc CXX=hipcc cmake -B<build_dir> . -DHIPTENSOR_BUILD_TESTS=OFF -DHIPTENSOR_BUILD_SAMPLES=ON
:code:`CC=hipcc CXX=hipcc cmake -B<build_dir> . -DHIPTENSOR_BUILD_TESTS=OFF -DHIPTENSOR_BUILD_SAMPLES=ON`

After configuration, build with

cmake --build <build_dir> -- -j
:code:`cmake --build <build_dir> -- -j`

The samples folder in <build_dir> contains executables in the table below.
The samples folder in :code:`<build_dir>` contains executables in the table below.

=================================== ===================================================================================
executable name description
Expand All @@ -154,13 +154,13 @@ Build library + tests

To build library and tests, run the following command :

CC=hipcc CXX=hipcc cmake -B<build_dir> .
:code:`CC=hipcc CXX=hipcc cmake -B<build_dir> .`

After configuration, build with

cmake --build <build_dir> -- -j
:code:`cmake --build <build_dir> -- -j`

The tests in <build_dir> contains executables in the table below.
The tests in `<build_dir>` contains executables in the table below.

====================================== ===================================================================================
executable name description
Expand All @@ -177,6 +177,7 @@ Build library + Documentation

Run the steps below to build documentation locally.

.. code-block::
cd docs
sudo apt-get update
Expand All @@ -191,4 +192,4 @@ Run the steps below to build documentation locally.
pdflatex hiptensor.tex
Generates hiptensor.pdf here
Generates :code:`hiptensor.pdf` here
Loading

0 comments on commit 67e4545

Please sign in to comment.