From 744164bbffd9443e7be3471f22016abd1c18cf83 Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Thu, 26 Oct 2023 16:26:51 -0600 Subject: [PATCH 1/5] Add linting workflow from rocm-docs-core --- .github/workflows/linting.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/linting.yml 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 From b23cfafbb51662a67ce2bc13e8f9fe7cfde0a111 Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Thu, 2 Nov 2023 15:17:24 -0600 Subject: [PATCH 2/5] Fix markdownlint violations --- README.md | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f3fe9aef..6b87d5de 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ # 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++. ## 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` ## Minimum Software Requirements + * ROCm stack minimum version 5.7 * ROCm-cmake minimum version 0.8.0 for ROCm 5.7 * C++ 17 @@ -14,13 +17,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 +33,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,6 +52,7 @@ 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! @@ -54,6 +62,7 @@ git push origin ## 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 +70,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 +82,52 @@ 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. ## Build + ```bash mkdir -p samples/build cd samples/build @@ -120,7 +139,9 @@ cmake -D CMAKE_PREFIX_PATH="/opt/rocm;${PATH_TO_HIPTENSOR_INSTALL_DIRECTORY};${PATH_TO_CK_INSTALL_DIRECTORY} \ .. ``` + ### Build client example + ```bash make ``` From 4df6352bcae41b445f936a0ba562a8001028f988 Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Thu, 2 Nov 2023 15:21:31 -0600 Subject: [PATCH 3/5] Allow duplicate headers - for changelog --- .markdownlint-cli2.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .markdownlint-cli2.yaml diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 00000000..44ca2886 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,3 @@ +config: + default: true + MD024: false From b95fddb9995c2f409faae7fdd5d2ff44e9be40cf Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Thu, 2 Nov 2023 15:25:42 -0600 Subject: [PATCH 4/5] Allow longer lines for tables and bash commands --- .markdownlint-cli2.yaml | 1 + README.md | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 44ca2886..19a4aa2c 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -1,3 +1,4 @@ config: default: true + MD013: false MD024: false diff --git a/README.md b/README.md index 6b87d5de..b06be1dd 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ # 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' +* 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` +> Note: Double precision FP64 datatype support requires +> gfx90a, gfx940, gfx941 or gfx942 ## Minimum Software Requirements @@ -124,7 +128,8 @@ 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 From 5b66c3efbe1209ee1e20431152ea62e5b227b66f Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Thu, 2 Nov 2023 15:30:15 -0600 Subject: [PATCH 5/5] Disable rule for two part list in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b06be1dd..f5e55943 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,11 @@ 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.`