diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 00000000..49bb5645 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,12 @@ +name: Linting + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +jobs: + call-workflow-passing-data: + name: Documentation + uses: RadeonOpenCompute/rocm-docs-core/.github/workflows/linting.yml@develop diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 00000000..19a4aa2c --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,4 @@ +config: + default: true + MD013: false + MD024: false diff --git a/README.md b/README.md index f3fe9aef..f5e55943 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,19 @@ # hipTensor -hiptensor is AMD's C++ library for accelerating tensor primitives based on the composable kernel library, through general purpose kernel languages, like HIP C++. + +hiptensor is AMD's C++ library for accelerating tensor primitives +based on the composable kernel library, +through general purpose kernel languages, like HIP C++. ## GPU Support -* AMD CDNA class GPU featuring matrix core support: gfx908, gfx90a, gfx940, gfx941, gfx942 as 'gfx9' -`Note: Double precision FP64 datatype support requires gfx90a, gfx940, gfx941 or gfx942` +* AMD CDNA class GPU featuring matrix core support: +gfx908, gfx90a, gfx940, gfx941, gfx942 as 'gfx9' + +> Note: Double precision FP64 datatype support requires +> gfx90a, gfx940, gfx941 or gfx942 ## Minimum Software Requirements + * ROCm stack minimum version 5.7 * ROCm-cmake minimum version 0.8.0 for ROCm 5.7 * C++ 17 @@ -14,13 +21,14 @@ hiptensor is AMD's C++ library for accelerating tensor primitives based on the c * Composable Kernel Optional: + * doxygen (for building documentation) ## Documentation Run the steps below to build documentation locally. -``` +```shell cd docs pip3 install -r .sphinx/requirements.txt @@ -29,13 +37,16 @@ python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html ``` ## Currently supported + Operations - Contraction Tensor Data Types - FP32 , FP64 ## Contributing to the code + 1. Create and track a hipTensor fork. 2. Clone your fork: -``` + +```shell git clone -b develop https://github.com//hipTensor.git . .githooks/install git checkout -b @@ -45,15 +56,19 @@ git commit -m "What was changed" git push origin ... ``` + + 3. Create a pull request to ROCmSoftwarePlatform/hipTensor develop branch. 4. Await CI and approval feedback. 5. Once approved, merge! + `Note: Please don't forget to install the githooks as there are triggers for clang formatting in commits.` ## Build with CMake ### Project options + |Option|Description|Default Value| |---|---|---| |AMDGPU_TARGETS|Build code for specific GPU target(s)|gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx940;gfx941;gfx942| @@ -61,6 +76,7 @@ git push origin |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| @@ -72,43 +88,53 @@ Here are some of the examples for the configuration: After configuration, build with `cmake --build -- -j` -### Tips to reduce tests compile time: -- Target a specific GPU (e.g. gfx908:xnack-) -- Use lots of threads (e.g. -j64) +### Tips to reduce tests compile time + +* Target a specific GPU (e.g. gfx908:xnack-) +* Use lots of threads (e.g. -j64) ## Running Unit Tests ### Logger tests + Tests API implementation of logger verbosity and functionality. -o /bin/logger_test +o /bin/logger_test ## Running Contraction Tests ### Bilinear contraction tests + Tests the API implementation of bilinear contraction algorithm with validation. -o /bin/bilinear_contraction_f32_test -o /bin/bilinear_contraction_f64_test +o /bin/bilinear_contraction_f32_test +o /bin/bilinear_contraction_f64_test ### Scale contraction tests + Tests the API implementation of scale contraction algorithm with validation. -o /bin/scale_contraction_f32_test -o /bin/scale_contraction_f64_test +o /bin/scale_contraction_f32_test +o /bin/scale_contraction_f64_test ### Samples + 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 /bin/simple_contraction_bilinear_f32 +o /bin/simple_contraction_bilinear_f32 ## F32 Scale contraction + Demonstrates the API implementation of scale contraction operation without validation. -o /bin/simple_contraction_scale_f32 +o /bin/simple_contraction_scale_f32 ### 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 + ```bash mkdir -p samples/build cd samples/build @@ -120,7 +146,9 @@ cmake -D CMAKE_PREFIX_PATH="/opt/rocm;${PATH_TO_HIPTENSOR_INSTALL_DIRECTORY};${PATH_TO_CK_INSTALL_DIRECTORY} \ .. ``` + ### Build client example + ```bash make ```