mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-14 18:17:44 +00:00
* New docs directory with minimal config
* Based on docs directory of rocBLAS
* Config for running Doxygen then Sphinx to generate HTML
* Add minimal content - intro to doc
* Add some boilerplate sections to doc
* content still needs to be done,
* e.g., need to generate API documentation using Doxygen
* need to write contributor guide
* Start Softmax section of Support Primitives doc
* Written as a test bed for typesetting math content
* Need to decide how much detail to go into
* add doc directories to git ignore file.
* Minor edits - new line at EOF, change year in copyright notices
* Port Markdown files to ReStructuredText
* Copy Markdown files from pre-existing doc directory to docs directory
* Convert to reStructured Text (rst) - section headings, links, tables
have a different syntax in rst
* New rst files added to index - can generate HTML with same style as
HTML generated from rst files in previous commits
* Intention is to make all the content in doc redundant and use rst
throughout rather than mix of md and rst
* Extend Softmax section of Primitives Guide
* rename l to z
* add material on applying softmax row-wise to matrix
* define macro for diag operator (represents diagonal matrix)
---------
Co-authored-by: zjing14 <zhangjing14@gmail.com>
[ROCm/composable_kernel commit: cb3fac4d2a]
97 lines
3.9 KiB
ReStructuredText
97 lines
3.9 KiB
ReStructuredText
===================
|
|
CK docker hub
|
|
===================
|
|
|
|
`Docker hub <https://hub.docker.com/r/rocm/composable_kernel>`_
|
|
|
|
-------------------------------------
|
|
Why do I need this?
|
|
-------------------------------------
|
|
|
|
To make our lives easier and bring Composable Kernel dependencies together, we recommend using docker images.
|
|
|
|
-------------------------------------
|
|
So what is Composable Kernel?
|
|
-------------------------------------
|
|
|
|
Composable Kernel (CK) library aims to provide a programming model for writing performance critical kernels for machine learning workloads across multiple architectures including GPUs, CPUs, etc, through general purpose kernel languages, like HIP C++.
|
|
|
|
To get the CK library::
|
|
|
|
git clone https://github.com/ROCmSoftwarePlatform/composable_kernel.git
|
|
|
|
|
|
|
|
run a docker container::
|
|
|
|
docker run \
|
|
-it \
|
|
--privileged \
|
|
--group-add sudo \
|
|
-w /root/workspace \
|
|
-v ${PATH_TO_LOCAL_WORKSPACE}:/root/workspace \
|
|
rocm/composable_kernel:ck_ub20.04_rocm5.3_release \
|
|
/bin/bash
|
|
|
|
and build the CK::
|
|
|
|
mkdir build && cd build
|
|
# Need to specify target ID, example below is for gfx908 and gfx90a
|
|
cmake \
|
|
-D CMAKE_PREFIX_PATH=/opt/rocm \
|
|
-D CMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
|
|
-D CMAKE_CXX_FLAGS="-O3" \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D GPU_TARGETS="gfx908;gfx90a" \
|
|
..
|
|
|
|
and::
|
|
|
|
make -j examples tests
|
|
|
|
To run all the test cases including tests and examples run::
|
|
|
|
make test
|
|
|
|
We can also run specific examples or tests like::
|
|
|
|
./bin/example_gemm_xdl_fp16
|
|
./bin/test_gemm_fp16
|
|
|
|
For more details visit `CK github repo <https://github.com/ROCmSoftwarePlatform/composable_kernel>`_, `CK examples <https://github.com/ROCmSoftwarePlatform/composable_kernel/tree/develop/example)>`_, `even more CK examples <https://github.com/ROCmSoftwarePlatform/composable_kernel/tree/develop/client_example>`_.
|
|
|
|
-------------------------------------
|
|
And what is inside?
|
|
-------------------------------------
|
|
|
|
The docker images have everything you need for running CK including:
|
|
|
|
* `ROCm <https://www.amd.com/en/graphics/servers-solutions-rocm>`_
|
|
* `CMake <https://cmake.org/>`_
|
|
* `Compiler <https://github.com/RadeonOpenCompute/llvm-project>`_
|
|
|
|
-------------------------------------
|
|
Which image is right for me?
|
|
-------------------------------------
|
|
|
|
Let's take a look at the image naming, for example "ck_ub20.04_rocm5.4_release". The image specs are:
|
|
|
|
* "ck" - made for running Composable Kernel
|
|
* "ub20.04" - based on Ubuntu 20.04
|
|
* "rocm5.4" - ROCm platform version 5.4
|
|
* "release" - compiler version is release
|
|
|
|
So just pick the right image for your project dependencies and you're all set.
|
|
|
|
-------------------------------------
|
|
DIY starts here
|
|
-------------------------------------
|
|
|
|
If you need to customize a docker image or just can't stop tinkering, feel free to adjust the `Dockerfile <https://github.com/ROCmSoftwarePlatform/composable_kernel/blob/develop/Dockerfile>`_ for your needs.
|
|
|
|
-------------------------------------
|
|
License
|
|
-------------------------------------
|
|
|
|
CK is released under the MIT `license <https://github.com/ROCmSoftwarePlatform/composable_kernel/blob/develop/LICENSE>`_.
|