Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(spack.rst): Update spack docs #11

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading