<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=Graphcore_Github_Code_Examples</id>
	<title>Graphcore Github Code Examples - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=Graphcore_Github_Code_Examples"/>
	<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Graphcore_Github_Code_Examples&amp;action=history"/>
	<updated>2026-05-05T01:12:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Graphcore_Github_Code_Examples&amp;diff=32479&amp;oldid=prev</id>
		<title>David: Created page with &quot;= Initial Setup = == Clone the Graphcore Git repo == At a location of your choosing, clone the Graphcore repo: &lt;pre&gt; ipuuser@ipu-host-3:~$ git clone https://github.com/graphco...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Graphcore_Github_Code_Examples&amp;diff=32479&amp;oldid=prev"/>
		<updated>2021-02-02T22:31:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Initial Setup = == Clone the Graphcore Git repo == At a location of your choosing, clone the Graphcore repo: &amp;lt;pre&amp;gt; ipuuser@ipu-host-3:~$ git clone https://github.com/graphco...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Initial Setup =&lt;br /&gt;
== Clone the Graphcore Git repo ==&lt;br /&gt;
At a location of your choosing, clone the Graphcore repo:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ipuuser@ipu-host-3:~$ git clone https://github.com/graphcore/examples&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Virtual Environment ==&lt;br /&gt;
It is advised to run python codes from within a virtual environment (called &amp;#039;&amp;#039;pop torch_test&amp;#039;&amp;#039; in this example):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ipuuser@ipu-host-3:~$ virtualenv -p python3 poptorch_test&lt;br /&gt;
Already using interpreter /usr/bin/python3&lt;br /&gt;
Using base prefix &amp;#039;/usr&amp;#039;&lt;br /&gt;
New python executable in /home/ipuuser/poptorch_test/bin/python3&lt;br /&gt;
Also creating executable in /home/ipuuser/poptorch_test/bin/python&lt;br /&gt;
Installing setuptools, pkg_resources, pip, wheel...done.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= BERT =&lt;br /&gt;
* Source your virtual environment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ipuuser@ipu-host-3:~$ source poptorch_test/bin/activate&lt;br /&gt;
(poptorch_test) ipuuser@ipu-host-3:~$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install the pop torch wheel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(poptorch_test) ipuuser@ipu-host-3:~$ pip install poplar_sdk-ubuntu_18_04-1.4.0+365-665f971c8f/poptorch-1.0.0+5352+e86081acc9+ubuntu_18_04-cp36-cp36m-linux_x86_64.whl &lt;br /&gt;
Processing ./poplar_sdk-ubuntu_18_04-1.4.0+365-665f971c8f/poptorch-1.0.0+5352+e86081acc9+ubuntu_18_04-cp36-cp36m-linux_x86_64.whl&lt;br /&gt;
Collecting torch@ https://download.pytorch.org/whl/cpu/torch-1.6.0%2Bcpu-cp36-cp36m-linux_x86_64.whl&lt;br /&gt;
  Downloading https://download.pytorch.org/whl/cpu/torch-1.6.0%2Bcpu-cp36-cp36m-linux_x86_64.whl (154.6 MB)&lt;br /&gt;
     |████████████████████████████████| 154.6 MB 55 kB/s &lt;br /&gt;
Collecting future&lt;br /&gt;
  Using cached future-0.18.2.tar.gz (829 kB)&lt;br /&gt;
Collecting numpy&lt;br /&gt;
  Downloading numpy-1.19.5-cp36-cp36m-manylinux2010_x86_64.whl (14.8 MB)&lt;br /&gt;
     |████████████████████████████████| 14.8 MB 10.5 MB/s &lt;br /&gt;
Building wheels for collected packages: future&lt;br /&gt;
  Building wheel for future (setup.py) ... done&lt;br /&gt;
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491059 sha256=a205f403c6972aa0df8ab84113967b7731bb2a664cf174a9c8fff6cd7703f775&lt;br /&gt;
  Stored in directory: /home/ipuuser/.cache/pip/wheels/6e/9c/ed/4499c9865ac1002697793e0ae05ba6be33553d098f3347fb94&lt;br /&gt;
Successfully built future&lt;br /&gt;
Installing collected packages: numpy, future, torch, poptorch&lt;br /&gt;
Successfully installed future-0.18.2 numpy-1.19.5 poptorch-1.0.0+5352 torch-1.6.0+cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change to the BERT directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(poptorch_test) ipuuser@ipu-host-3:~$ cd /home/ipuuser/Downloads/examples/code_examples/pytorch/bert&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install the &amp;#039;&amp;#039;requirements&amp;#039;&amp;#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(poptorch_test) ipuuser@ipu-host-3:~/Downloads/examples/code_examples/pytorch/bert$ python3 -m pip install -r requirements.txt &lt;br /&gt;
Collecting transformers==2.11&lt;br /&gt;
  Using cached transformers-2.11.0-py3-none-any.whl (674 kB)&lt;br /&gt;
Requirement already satisfied: torch==1.6.0 in /home/ipuuser/poptorch_test/lib/python3.6/site-packages (from -r requirements.txt (line 2)) (1.6.0+cpu)&lt;br /&gt;
Requirement already satisfied: numpy in /home/ipuuser/poptorch_test/lib/python3.6/site-packages (from torch==1.6.0-&amp;gt;-r requirements.txt (line 2)) (1.19.5)&lt;br /&gt;
Requirement already satisfied: future in /home/ipuuser/poptorch_test/lib/python3.6/site-packages (from torch==1.6.0-&amp;gt;-r requirements.txt (line 2)) (0.18.2)&lt;br /&gt;
Collecting tqdm&amp;gt;=4.27&lt;br /&gt;
  Using cached tqdm-4.56.0-py2.py3-none-any.whl (72 kB)&lt;br /&gt;
Collecting filelock&lt;br /&gt;
  Using cached filelock-3.0.12-py3-none-any.whl (7.6 kB)&lt;br /&gt;
Collecting requests&lt;br /&gt;
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)&lt;br /&gt;
Collecting tokenizers==0.7.0&lt;br /&gt;
  Using cached tokenizers-0.7.0-cp36-cp36m-manylinux1_x86_64.whl (3.8 MB)&lt;br /&gt;
Collecting sentencepiece&lt;br /&gt;
  Downloading sentencepiece-0.1.95-cp36-cp36m-manylinux2014_x86_64.whl (1.2 MB)&lt;br /&gt;
     |████████████████████████████████| 1.2 MB 8.7 MB/s &lt;br /&gt;
Collecting regex!=2019.12.17&lt;br /&gt;
  Downloading regex-2020.11.13-cp36-cp36m-manylinux2014_x86_64.whl (723 kB)&lt;br /&gt;
     |████████████████████████████████| 723 kB 52.4 MB/s &lt;br /&gt;
Collecting packaging&lt;br /&gt;
  Using cached packaging-20.8-py2.py3-none-any.whl (39 kB)&lt;br /&gt;
Collecting dataclasses&lt;br /&gt;
  Using cached dataclasses-0.8-py3-none-any.whl (19 kB)&lt;br /&gt;
Collecting sacremoses&lt;br /&gt;
  Using cached sacremoses-0.0.43.tar.gz (883 kB)&lt;br /&gt;
Collecting pyparsing&amp;gt;=2.0.2&lt;br /&gt;
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)&lt;br /&gt;
Collecting idna&amp;lt;3,&amp;gt;=2.5&lt;br /&gt;
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)&lt;br /&gt;
Collecting certifi&amp;gt;=2017.4.17&lt;br /&gt;
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)&lt;br /&gt;
Collecting chardet&amp;lt;5,&amp;gt;=3.0.2&lt;br /&gt;
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)&lt;br /&gt;
Collecting urllib3&amp;lt;1.27,&amp;gt;=1.21.1&lt;br /&gt;
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)&lt;br /&gt;
Collecting six&lt;br /&gt;
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)&lt;br /&gt;
Collecting click&lt;br /&gt;
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)&lt;br /&gt;
Collecting joblib&lt;br /&gt;
  Using cached joblib-1.0.0-py3-none-any.whl (302 kB)&lt;br /&gt;
Building wheels for collected packages: sacremoses&lt;br /&gt;
  Building wheel for sacremoses (setup.py) ... done&lt;br /&gt;
  Created wheel for sacremoses: filename=sacremoses-0.0.43-py3-none-any.whl size=893258 sha256=01fff2a61df84167df6fdf0754596381e974782aeb1835565df2c8758672dc05&lt;br /&gt;
  Stored in directory: /home/ipuuser/.cache/pip/wheels/49/25/98/cdea9c79b2d9a22ccc59540b1784b67f06b633378e97f58da2&lt;br /&gt;
Successfully built sacremoses&lt;br /&gt;
Installing collected packages: urllib3, tqdm, six, regex, pyparsing, joblib, idna, click, chardet, certifi, tokenizers, sentencepiece, sacremoses, requests, packaging, filelock, dataclasses, transformers&lt;br /&gt;
Successfully installed certifi-2020.12.5 chardet-4.0.0 click-7.1.2 dataclasses-0.8 filelock-3.0.12 idna-2.10 joblib-1.0.0 packaging-20.8 pyparsing-2.4.7 regex-2020.11.13 requests-2.25.1 sacremoses-0.0.43 sentencepiece-0.1.95 six-1.15.0 tokenizers-0.7.0 tqdm-4.56.0 transformers-2.11.0 urllib3-1.26.3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>David</name></author>
	</entry>
</feed>