Skip to content

Commit

Permalink
Merge pull request #11 from ROCm/spack
Browse files Browse the repository at this point in the history
docs(spack.rst): Update spack docs
  • Loading branch information
samjwu authored Dec 6, 2023
2 parents fa2069a + 340baff commit a1be103
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions docs/how-to/spack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Building ROCm components using Spack

.. code-block:: shell
git clone <https://github.com/spack/spack>
git clone https://github.com/spack/spack.git
2. Initialize Spack.

Expand All @@ -147,14 +147,14 @@ Building ROCm components using Spack
cd spack
. share/spack/setup-env.sh
./share/spack/setup-env.sh
Spack commands are available once the above steps are completed. To list the available commands,
use ``help``.

.. code-block:: shell
root@[ixt-rack-104:/spack\#](http://ixt-rack-104/spack) spack help
root@computername:~$ spack help
Installing ROCm components using Spack
===================================================
Expand Down Expand Up @@ -189,7 +189,7 @@ Installing ROCm components using Spack

.. code-block:: shell
root@[ixt-rack-104:/spack\#](http://ixt-rack-104/spack) spack info mivisionx
root@computername:~$ spack info mivisionx
CMakePackage: mivisionx
Description:
Expand Down Expand Up @@ -245,8 +245,6 @@ Installing ROCm components using Spack
Run Dependencies:
None
root@[ixt-rack-104:/spack\#](http://ixt-rack-104/spack)
Installing variants for ROCm components
===================================================

Expand All @@ -271,7 +269,7 @@ For example:

.. code-block:: shell
root@[ixt-rack-104:/spack\#](http://ixt-rack-104/spack) spack spec mivisionx
root@computername:~$ spack spec mivisionx
Input spec
--------------------------------
mivisionx
Expand Down Expand Up @@ -366,7 +364,7 @@ To generate a patch and build with the changes:
spack stage [email protected] # (This will pull the 5.2.0 release version source code of hip and display the path to spack-src directory where entire source code is available)
root@[ixt-rack-104:/spack#](http://ixt-rack-104/spack) spack stage [email protected]
root@computername:~/spack$ spack stage [email protected]
==> Fetching <https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-5.2.0.tar.gz>
==> Fetching <https://github.com/ROCm-Developer-Tools/hipamd/archive/rocm-5.2.0.tar.gz>
==> Fetching <https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-5.2.0.tar.gz>
Expand All @@ -385,26 +383,27 @@ To generate a patch and build with the changes:

.. code-block:: shell
root@[ixt-rack-104:/spack#cd /tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7](http://ixt-rack-104/spack)
root@[ixt-rack-104:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7#](http://ixt-rack-104/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7) cd spack-src/
root@computername:~/spack$ cd /tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7
root@computername:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7$ cd spack-src/
3. Create a new Git repository.

.. code-block:: shell
root@[ixt-rack-104:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src#](http://ixt-rack-104/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src) git init
root@computername:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src$ git init
4. Add the entire directory to the repository.

.. code-block:: shell
root@[ixt-rack-104:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src#](http://ixt-rack-104/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src) git add .
root@computername:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src$ git add .
5. Make the required changes to the source code.

.. code-block:: shell
root@[ixt-rack-104:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src#](http://ixt-rack-104/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src) vi hipamd/CMakeLists.txt (Make required changes in the source code)
root@computername:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src$ vi hipamd/CMakeLists.txt
(Make required changes in the source code)
6. Generate the patch using the ``git diff`` command.

Expand All @@ -416,7 +415,7 @@ To generate a patch and build with the changes:

.. code-block:: shell
root@[ixt-rack-104:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src#](http://ixt-rack-104/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src) spack edit hip
root@computername:/tmp/root/spack-stage/spack-stage-hip-5.2.0-wzo5y6ysvmadyb5mvffr35galb6vjxb7/spack-src$ spack edit hip
Provide the patch file name and the conditions for the patch:

Expand Down

0 comments on commit a1be103

Please sign in to comment.