Skip to content

Commit 3066eb5

Browse files
Update docs
1 parent 73a8633 commit 3066eb5

File tree

4 files changed

+177
-23
lines changed

4 files changed

+177
-23
lines changed

_sources/get_started/Installation.md.txt

Lines changed: 89 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,95 @@ If you want to install **tile-lang** in development mode, you can run the follow
6868
pip install -e .
6969
```
7070

71-
We currently provide three methods to install **tile-lang**:
71+
We currently provide four methods to install **tile-lang**:
7272

73-
1. [Install from Source (using your own TVM installation)](#install-method-1)
74-
2. [Install from Source (using the bundled TVM submodule)](#install-method-2)
75-
3. [Install Using the Provided Script](#install-method-3)
73+
1. [Install Using Docker](#install-method-1) (Recommended)
74+
2. [Install from Source (using your own TVM installation)](#install-method-2)
75+
3. [Install from Source (using the bundled TVM submodule)](#install-method-3)
76+
4. [Install Using the Provided Script](#install-method-4)
7677

7778
(install-method-1)=
7879

79-
### Method 1: Install from Source (Using Your Own TVM Installation)
80+
### Method 1: Install Using Docker (Recommended)
81+
82+
For users who prefer a containerized environment with all dependencies pre-configured, **tile-lang** provides Docker images for different CUDA versions. This method is particularly useful for ensuring consistent environments across different systems and is the **recommended approach** for most users.
83+
84+
**Prerequisites:**
85+
- Docker installed on your system
86+
- NVIDIA Docker runtime (nvidia-docker2) for GPU support
87+
- Compatible NVIDIA GPU (e.g., B200, H100, etc.)
88+
89+
1. **Clone the Repository**:
90+
91+
```bash
92+
git clone --recursive https://github.com/tile-ai/tilelang
93+
cd tilelang
94+
```
95+
96+
2. **Build Docker Image**:
97+
98+
Navigate to the docker directory and build the image for your desired CUDA version:
99+
100+
```bash
101+
cd docker
102+
docker build -f Dockerfile.cu120 -t tilelang-cu120 .
103+
```
104+
105+
Available Dockerfiles:
106+
- `Dockerfile.cu120` - For CUDA 12.0
107+
- Other CUDA versions may be available in the docker directory
108+
109+
3. **Run Docker Container**:
110+
111+
Start the container with GPU access and volume mounting:
112+
113+
```bash
114+
docker run -itd \
115+
--shm-size 32g \
116+
--gpus all \
117+
-v /home/tilelang:/home/tilelang \
118+
--name tilelang_b200 \
119+
tilelang-cu120 \
120+
/bin/zsh
121+
```
122+
123+
**Command Parameters Explanation:**
124+
- `--shm-size 32g`: Increases shared memory size for better performance
125+
- `--gpus all`: Enables access to all available GPUs
126+
- `-v /home/tilelang:/home/tilelang`: Mounts host directory to container (adjust path as needed)
127+
- `--name tilelang_b200`: Assigns a name to the container for easy management
128+
- `/bin/zsh`: Uses zsh as the default shell
129+
130+
4. **Access the Container**:
131+
132+
```bash
133+
docker exec -it tilelang_b200 /bin/zsh
134+
```
135+
136+
5. **Verify Installation**:
137+
138+
Once inside the container, verify that **tile-lang** is working correctly:
139+
140+
```bash
141+
python -c "import tilelang; print(tilelang.__version__)"
142+
```
143+
144+
You can now run TileLang examples and develop your applications within the containerized environment. The Docker image comes with all necessary dependencies pre-installed, including CUDA toolkit, TVM, and TileLang itself.
145+
146+
**Example Usage:**
147+
148+
After accessing the container, you can run TileLang examples:
149+
150+
```bash
151+
cd /home/tilelang/examples
152+
python elementwise/test_example_elementwise.py
153+
```
154+
155+
This Docker-based installation method provides a complete, isolated environment that works seamlessly on systems with compatible NVIDIA GPUs like the B200, ensuring optimal performance for TileLang applications.
156+
157+
(install-method-2)=
158+
159+
### Method 2: Install from Source (Using Your Own TVM Installation)
80160

81161
If you already have a compatible TVM installation, follow these steps:
82162

@@ -110,9 +190,9 @@ export PYTHONPATH=/your/path/to/tilelang/:$PYTHONPATH
110190
export TVM_IMPORT_PYTHON_PATH=/your/path/to/tvm/python
111191
```
112192

113-
(install-method-2)=
193+
(install-method-3)=
114194

115-
### Method 2: Install from Source (Using the Bundled TVM Submodule)
195+
### Method 3: Install from Source (Using the Bundled TVM Submodule)
116196

117197
If you prefer to use the built-in TVM version, follow these instructions:
118198

@@ -150,9 +230,9 @@ Ensure the `tile-lang` Python package is in your `PYTHONPATH`:
150230
export PYTHONPATH=/your/path/to/tilelang/:$PYTHONPATH
151231
```
152232

153-
(install-method-3)=
233+
(install-method-4)=
154234

155-
### Method 3: Install Using the Provided Script
235+
### Method 4: Install Using the Provided Script
156236

157237
For a simplified installation, use the provided script:
158238

get_started/Installation.html

Lines changed: 87 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,87 @@ <h2>Building from Source<a class="headerlink" href="#building-from-source" title
529529
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.
530530
</pre></div>
531531
</div>
532-
<p>We currently provide three methods to install <strong>tile-lang</strong>:</p>
532+
<p>We currently provide four methods to install <strong>tile-lang</strong>:</p>
533533
<ol class="arabic simple">
534-
<li><p><a class="reference internal" href="#install-method-1">Install from Source (using your own TVM installation)</a></p></li>
535-
<li><p><a class="reference internal" href="#install-method-2">Install from Source (using the bundled TVM submodule)</a></p></li>
536-
<li><p><a class="reference internal" href="#install-method-3">Install Using the Provided Script</a></p></li>
534+
<li><p><a class="reference internal" href="#install-method-1">Install Using Docker</a> (Recommended)</p></li>
535+
<li><p><a class="reference internal" href="#install-method-2">Install from Source (using your own TVM installation)</a></p></li>
536+
<li><p><a class="reference internal" href="#install-method-3">Install from Source (using the bundled TVM submodule)</a></p></li>
537+
<li><p><a class="reference internal" href="#install-method-4">Install Using the Provided Script</a></p></li>
537538
</ol>
538-
<section id="method-1-install-from-source-using-your-own-tvm-installation">
539-
<span id="install-method-1"></span><h3>Method 1: Install from Source (Using Your Own TVM Installation)<a class="headerlink" href="#method-1-install-from-source-using-your-own-tvm-installation" title="Link to this heading"></a></h3>
539+
<section id="method-1-install-using-docker-recommended">
540+
<span id="install-method-1"></span><h3>Method 1: Install Using Docker (Recommended)<a class="headerlink" href="#method-1-install-using-docker-recommended" title="Link to this heading"></a></h3>
541+
<p>For users who prefer a containerized environment with all dependencies pre-configured, <strong>tile-lang</strong> provides Docker images for different CUDA versions. This method is particularly useful for ensuring consistent environments across different systems and is the <strong>recommended approach</strong> for most users.</p>
542+
<p><strong>Prerequisites:</strong></p>
543+
<ul class="simple">
544+
<li><p>Docker installed on your system</p></li>
545+
<li><p>NVIDIA Docker runtime (nvidia-docker2) for GPU support</p></li>
546+
<li><p>Compatible NVIDIA GPU (e.g., B200, H100, etc.)</p></li>
547+
</ul>
548+
<ol class="arabic simple">
549+
<li><p><strong>Clone the Repository</strong>:</p></li>
550+
</ol>
551+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>--recursive<span class="w"> </span>https://github.com/tile-ai/tilelang
552+
<span class="nb">cd</span><span class="w"> </span>tilelang
553+
</pre></div>
554+
</div>
555+
<ol class="arabic simple" start="2">
556+
<li><p><strong>Build Docker Image</strong>:</p></li>
557+
</ol>
558+
<p>Navigate to the docker directory and build the image for your desired CUDA version:</p>
559+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>docker
560+
docker<span class="w"> </span>build<span class="w"> </span>-f<span class="w"> </span>Dockerfile.cu120<span class="w"> </span>-t<span class="w"> </span>tilelang-cu120<span class="w"> </span>.
561+
</pre></div>
562+
</div>
563+
<p>Available Dockerfiles:</p>
564+
<ul class="simple">
565+
<li><p><code class="docutils literal notranslate"><span class="pre">Dockerfile.cu120</span></code> - For CUDA 12.0</p></li>
566+
<li><p>Other CUDA versions may be available in the docker directory</p></li>
567+
</ul>
568+
<ol class="arabic simple" start="3">
569+
<li><p><strong>Run Docker Container</strong>:</p></li>
570+
</ol>
571+
<p>Start the container with GPU access and volume mounting:</p>
572+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>docker<span class="w"> </span>run<span class="w"> </span>-itd<span class="w"> </span><span class="se">\</span>
573+
<span class="w"> </span>--shm-size<span class="w"> </span>32g<span class="w"> </span><span class="se">\</span>
574+
<span class="w"> </span>--gpus<span class="w"> </span>all<span class="w"> </span><span class="se">\</span>
575+
<span class="w"> </span>-v<span class="w"> </span>/home/tilelang:/home/tilelang<span class="w"> </span><span class="se">\</span>
576+
<span class="w"> </span>--name<span class="w"> </span>tilelang_b200<span class="w"> </span><span class="se">\</span>
577+
<span class="w"> </span>tilelang-cu120<span class="w"> </span><span class="se">\</span>
578+
<span class="w"> </span>/bin/zsh
579+
</pre></div>
580+
</div>
581+
<p><strong>Command Parameters Explanation:</strong></p>
582+
<ul class="simple">
583+
<li><p><code class="docutils literal notranslate"><span class="pre">--shm-size</span> <span class="pre">32g</span></code>: Increases shared memory size for better performance</p></li>
584+
<li><p><code class="docutils literal notranslate"><span class="pre">--gpus</span> <span class="pre">all</span></code>: Enables access to all available GPUs</p></li>
585+
<li><p><code class="docutils literal notranslate"><span class="pre">-v</span> <span class="pre">/home/tilelang:/home/tilelang</span></code>: Mounts host directory to container (adjust path as needed)</p></li>
586+
<li><p><code class="docutils literal notranslate"><span class="pre">--name</span> <span class="pre">tilelang_b200</span></code>: Assigns a name to the container for easy management</p></li>
587+
<li><p><code class="docutils literal notranslate"><span class="pre">/bin/zsh</span></code>: Uses zsh as the default shell</p></li>
588+
</ul>
589+
<ol class="arabic simple" start="4">
590+
<li><p><strong>Access the Container</strong>:</p></li>
591+
</ol>
592+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>docker<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>-it<span class="w"> </span>tilelang_b200<span class="w"> </span>/bin/zsh
593+
</pre></div>
594+
</div>
595+
<ol class="arabic simple" start="5">
596+
<li><p><strong>Verify Installation</strong>:</p></li>
597+
</ol>
598+
<p>Once inside the container, verify that <strong>tile-lang</strong> is working correctly:</p>
599+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-c<span class="w"> </span><span class="s2">&quot;import tilelang; print(tilelang.__version__)&quot;</span>
600+
</pre></div>
601+
</div>
602+
<p>You can now run TileLang examples and develop your applications within the containerized environment. The Docker image comes with all necessary dependencies pre-installed, including CUDA toolkit, TVM, and TileLang itself.</p>
603+
<p><strong>Example Usage:</strong></p>
604+
<p>After accessing the container, you can run TileLang examples:</p>
605+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span><span class="w"> </span>/home/tilelang/examples
606+
python<span class="w"> </span>elementwise/test_example_elementwise.py
607+
</pre></div>
608+
</div>
609+
<p>This Docker-based installation method provides a complete, isolated environment that works seamlessly on systems with compatible NVIDIA GPUs like the B200, ensuring optimal performance for TileLang applications.</p>
610+
</section>
611+
<section id="method-2-install-from-source-using-your-own-tvm-installation">
612+
<span id="install-method-2"></span><h3>Method 2: Install from Source (Using Your Own TVM Installation)<a class="headerlink" href="#method-2-install-from-source-using-your-own-tvm-installation" title="Link to this heading"></a></h3>
540613
<p>If you already have a compatible TVM installation, follow these steps:</p>
541614
<ol class="arabic simple">
542615
<li><p><strong>Clone the Repository</strong>:</p></li>
@@ -566,8 +639,8 @@ <h2>Building from Source<a class="headerlink" href="#building-from-source" title
566639
</pre></div>
567640
</div>
568641
</section>
569-
<section id="method-2-install-from-source-using-the-bundled-tvm-submodule">
570-
<span id="install-method-2"></span><h3>Method 2: Install from Source (Using the Bundled TVM Submodule)<a class="headerlink" href="#method-2-install-from-source-using-the-bundled-tvm-submodule" title="Link to this heading"></a></h3>
642+
<section id="method-3-install-from-source-using-the-bundled-tvm-submodule">
643+
<span id="install-method-3"></span><h3>Method 3: Install from Source (Using the Bundled TVM Submodule)<a class="headerlink" href="#method-3-install-from-source-using-the-bundled-tvm-submodule" title="Link to this heading"></a></h3>
571644
<p>If you prefer to use the built-in TVM version, follow these instructions:</p>
572645
<ol class="arabic simple">
573646
<li><p><strong>Clone the Repository</strong>:</p></li>
@@ -600,8 +673,8 @@ <h2>Building from Source<a class="headerlink" href="#building-from-source" title
600673
</pre></div>
601674
</div>
602675
</section>
603-
<section id="method-3-install-using-the-provided-script">
604-
<span id="install-method-3"></span><h3>Method 3: Install Using the Provided Script<a class="headerlink" href="#method-3-install-using-the-provided-script" title="Link to this heading"></a></h3>
676+
<section id="method-4-install-using-the-provided-script">
677+
<span id="install-method-4"></span><h3>Method 4: Install Using the Provided Script<a class="headerlink" href="#method-4-install-using-the-provided-script" title="Link to this heading"></a></h3>
605678
<p>For a simplified installation, use the provided script:</p>
606679
<ol class="arabic simple">
607680
<li><p><strong>Clone the Repository</strong>:</p></li>
@@ -690,9 +763,10 @@ <h2>Install with Nightly Version<a class="headerlink" href="#install-with-nightl
690763
<li><a class="reference internal" href="#">Installation Guide</a><ul>
691764
<li><a class="reference internal" href="#installing-with-pip">Installing with pip</a></li>
692765
<li><a class="reference internal" href="#building-from-source">Building from Source</a><ul>
693-
<li><a class="reference internal" href="#method-1-install-from-source-using-your-own-tvm-installation">Method 1: Install from Source (Using Your Own TVM Installation)</a></li>
694-
<li><a class="reference internal" href="#method-2-install-from-source-using-the-bundled-tvm-submodule">Method 2: Install from Source (Using the Bundled TVM Submodule)</a></li>
695-
<li><a class="reference internal" href="#method-3-install-using-the-provided-script">Method 3: Install Using the Provided Script</a></li>
766+
<li><a class="reference internal" href="#method-1-install-using-docker-recommended">Method 1: Install Using Docker (Recommended)</a></li>
767+
<li><a class="reference internal" href="#method-2-install-from-source-using-your-own-tvm-installation">Method 2: Install from Source (Using Your Own TVM Installation)</a></li>
768+
<li><a class="reference internal" href="#method-3-install-from-source-using-the-bundled-tvm-submodule">Method 3: Install from Source (Using the Bundled TVM Submodule)</a></li>
769+
<li><a class="reference internal" href="#method-4-install-using-the-provided-script">Method 4: Install Using the Provided Script</a></li>
696770
</ul>
697771
</li>
698772
<li><a class="reference internal" href="#install-with-nightly-version">Install with Nightly Version</a></li>

objects.inv

25 Bytes
Binary file not shown.

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)