Compile on CPU
On This Page
Compile on CPU¶
We recommend that you:
First use the
csrun_cpuBash script to compile your model successfully on an Original Cerebras Support-Cluster CPU node, and
Only then run the model on the CS system using the
See The csrun_cpu Script for detailed documentation on how to use this Bash script.
Running your model using
csrun_cpu first on an Original Cerebras Support-Cluster CPU node has several benefits:
- Validate only
You can run in
validate_onlymode that runs a fast, light-weight verification. See Validate only.
After a successful
validate_onlyrun, you can run full compilation with
compile_onlymode. See compile-only.
- Using compiled artifacts
You can optimize for your specific CS system early on, even while running
compile_onlyon the Original Cerebras Support-Cluster CPU. This enables you to use these compiled artifacts later when you run this network on the CS system and save time in your workflow. You can accomplish this by running the
--cs_ipflag and passing in the IP address of the CS system. This will ensure that
csrun_cpuoptimizes the compile for your specific CS system. See using-compiled-artifacts.
To run your model with
compile_onlyoption, you do not need access to the CS system. However, if you plan to use the artifacts of this compiled directory for training on the CS system, then you must use
--cs_ipflag with the
csrun_cpuand pass the IP address of the CS system.
You can compile your neural network on a CPU without running it on the CS system. Note that to compile on a CPU, you must execute your compile commands within the Cerebras Singularity container. The CGC (Cerebras Graph Compiler) software contains the
csrun_cpu script that launches a given user command within the Cerebras Singularity container. For example:
will launch a Bash shell inside the Cerebras container, andcsrun_cpu python
will launch a Python interpreter inside the Cerebras container.
csrun_cpu script to execute a run script like
compile_only options on a CPU.