import{S as Lr,i as Rr,s as Mr,e as o,k as p,w as E,t as i,M as Ur,c as r,d as n,m as h,a as l,x as P,h as s,b as c,G as t,g as f,y as T,q as C,o as k,B as D,v as Nr}from"../chunks/vendor-hf-doc-builder.js";import{T as Or}from"../chunks/Tip-hf-doc-builder.js";import{I as ht}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as ze}from"../chunks/CodeBlock-hf-doc-builder.js";function Sr(ft){let d,S;return{c(){d=o("p"),S=i("oneccl_bindings_for_pytorch 1.12.0 prebuilt wheel does not work with PyTorch 1.12.1 (it is for PyTorch 1.12.0)")},l(_){d=r(_,"P",{});var b=l(d);S=s(b,"oneccl_bindings_for_pytorch 1.12.0 prebuilt wheel does not work with PyTorch 1.12.1 (it is for PyTorch 1.12.0)"),b.forEach(n)},m(_,b){f(_,d,b),t(d,S)},d(_){_&&n(d)}}}function qr(ft){let d,S,_,b,Ve,V,Xt,Xe,Ft,dt,de,Jt,_t,R,q,Fe,X,Yt,Je,Qt,ut,A,F,Zt,en,J,tn,nn,Y,on,rn,mt,I,ln,Ye,an,sn,Qe,cn,pn,vt,H,hn,Q,fn,dn,gt,M,W,Ze,Z,_n,et,un,bt,_e,mn,xt,j,tt,u,ue,vn,gn,me,bn,xn,ve,yn,wn,ge,$n,En,be,Pn,Tn,xe,Cn,kn,U,m,ye,Dn,An,nt,In,we,Ln,Rn,$e,Mn,Un,Ee,Nn,On,Pe,Sn,qn,v,Te,Hn,Wn,ot,jn,Ce,Bn,Kn,ke,Gn,zn,De,Vn,Xn,Ae,Fn,Jn,g,Ie,Yn,Qn,Le,Zn,eo,Re,to,no,Me,oo,ro,Ue,lo,ao,rt,yt,ee,wt,L,io,lt,so,co,te,po,ho,$t,B,Et,N,K,at,ne,fo,it,_o,Pt,Ne,uo,Tt,Oe,mo,Ct,oe,kt,Se,vo,Dt,re,At,qe,go,It,O,G,st,le,bo,ct,xo,Lt,ae,yo,ie,wo,Rt,He,$o,Mt,se,Ut,We,Eo,Nt,je,Po,Ot,ce,St,z,To,pt,Co,ko,qt,pe,Ht;return V=new ht({}),X=new ht({}),Z=new ht({}),ee=new ze({props:{code:"pip install oneccl_bind_pt=={pytorch_version} -f https://software.intel.com/ipex-whl-stable",highlighted:'pip install oneccl_bind_pt=={<span class="hljs-attribute">pytorch_version} -f https</span>://software<span class="hljs-variable">.intel</span><span class="hljs-variable">.com</span>/ipex-whl-stable'}}),B=new Or({props:{warning:!0,$$slots:{default:[Sr]},$$scope:{ctx:ft}}}),ne=new ht({}),oe=new ze({props:{code:`oneccl_bindings_for_pytorch_path=$(python -c "from oneccl_bindings_for_pytorch import cwd; print(cwd)")
source $oneccl_bindings_for_pytorch_path/env/setvars.sh`,highlighted:`oneccl_bindings_for_pytorch_path=$(<span class="hljs-keyword">python</span> -c <span class="hljs-string">&quot;from oneccl_bindings_for_pytorch import cwd; print(cwd)&quot;</span>)
<span class="hljs-keyword">source</span> $oneccl_bindings_for_pytorch_path/<span class="hljs-keyword">env</span>/setvars.sh`}}),re=new ze({props:{code:`torch_ccl_path=$(python -c "import torch; import torch_ccl; import os;  print(os.path.abspath(os.path.dirname(torch_ccl.__file__)))")
source $torch_ccl_path/env/setvars.sh`,highlighted:`torch_ccl_path=$(<span class="hljs-keyword">python</span> -c <span class="hljs-string">&quot;import torch; import torch_ccl; import os;  print(os.path.abspath(os.path.dirname(torch_ccl.__file__)))&quot;</span>)
<span class="hljs-keyword">source</span> $torch_ccl_path/<span class="hljs-keyword">env</span>/setvars.sh`}}),le=new ht({}),se=new ze({props:{code:` export CCL_WORKER_COUNT=1
 export MASTER_ADDR=127.0.0.1
 mpirun -n 2 -genv OMP_NUM_THREADS=23 \\
 python3 run_qa.py \\
 --model_name_or_path bert-large-uncased \\
 --dataset_name squad \\
 --do_train \\
 --do_eval \\
 --per_device_train_batch_size 12  \\
 --learning_rate 3e-5  \\
 --num_train_epochs 2  \\
 --max_seq_length 384 \\
 --doc_stride 128  \\
 --output_dir /tmp/debug_squad/ \\
 --no_cuda \\
 --xpu_backend ccl`,highlighted:` export CCL_WORKER_COUNT=1
 export MASTER_ADDR=127.0.0.1
 mpirun -n 2 -genv OMP_NUM_THREADS=23 \\
 python3 run_qa.py \\
 --model_name_or_path bert-large-uncased \\
 --dataset_name squad \\
 --do_train \\
 --do_eval \\
 --per_device_train_batch_size 12  \\
 --learning_rate 3e-5  \\
 --num_train_epochs 2  \\
 --max_seq_length 384 \\
 --doc_stride 128  \\
 --output_dir /tmp/debug_squad/ \\
 --no_cuda \\
 --xpu_backend ccl`}}),ce=new ze({props:{code:` cat hostfile
 xxx.xxx.xxx.xxx #node0 ip
 xxx.xxx.xxx.xxx #node1 ip`,highlighted:` cat hostfile
 xxx.xxx.xxx.xxx #node0 ip
 xxx.xxx.xxx.xxx #node1 ip`}}),pe=new ze({props:{code:` export CCL_WORKER_COUNT=1
 export MASTER_ADDR=xxx.xxx.xxx.xxx #node0 ip
 mpirun -f hostfile -n 4 -ppn 2 \\
 -genv OMP_NUM_THREADS=23 \\
 python3 run_qa.py \\
 --model_name_or_path bert-large-uncased \\
 --dataset_name squad \\
 --do_train \\
 --do_eval \\
 --per_device_train_batch_size 12  \\
 --learning_rate 3e-5  \\
 --num_train_epochs 2  \\
 --max_seq_length 384 \\
 --doc_stride 128  \\
 --output_dir /tmp/debug_squad/ \\
 --no_cuda \\
 --xpu_backend ccl`,highlighted:` export CCL_WORKER_COUNT=1
 export MASTER_ADDR=xxx.xxx.xxx.xxx #node0 ip
 mpirun -f hostfile -n 4 -ppn 2 \\
 -genv OMP_NUM_THREADS=23 \\
 python3 run_qa.py \\
 --model_name_or_path bert-large-uncased \\
 --dataset_name squad \\
 --do_train \\
 --do_eval \\
 --per_device_train_batch_size 12  \\
 --learning_rate 3e-5  \\
 --num_train_epochs 2  \\
 --max_seq_length 384 \\
 --doc_stride 128  \\
 --output_dir /tmp/debug_squad/ \\
 --no_cuda \\
 --xpu_backend ccl`}}),{c(){d=o("meta"),S=p(),_=o("h1"),b=o("a"),Ve=o("span"),E(V.$$.fragment),Xt=p(),Xe=o("span"),Ft=i("Efficient Training on Multiple CPUs"),dt=p(),de=o("p"),Jt=i("When training on a single CPU is too slow, we can use multiple CPUs. This guide focuses on PyTorch-based DDP enabling distributed CPU training efficiently."),_t=p(),R=o("h2"),q=o("a"),Fe=o("span"),E(X.$$.fragment),Yt=p(),Je=o("span"),Qt=i("Intel\xAE oneCCL Bindings for PyTorch"),ut=p(),A=o("p"),F=o("a"),Zt=i("Intel\xAE oneCCL"),en=i(" (collective communications library) is a library for efficient distributed deep learning training implementing such collectives like allreduce, allgather, alltoall. For more information on oneCCL, please refer to the "),J=o("a"),tn=i("oneCCL documentation"),nn=i(" and "),Y=o("a"),on=i("oneCCL specification"),rn=i("."),mt=p(),I=o("p"),ln=i("Module "),Ye=o("code"),an=i("oneccl_bindings_for_pytorch"),sn=i(" ("),Qe=o("code"),cn=i("torch_ccl"),pn=i(" before version 1.12)  implements PyTorch C10D ProcessGroup API and can be dynamically loaded as external ProcessGroup and only works on Linux platform now"),vt=p(),H=o("p"),hn=i("Check more detailed information for "),Q=o("a"),fn=i("oneccl_bind_pt"),dn=i("."),gt=p(),M=o("h3"),W=o("a"),Ze=o("span"),E(Z.$$.fragment),_n=p(),et=o("span"),un=i("Intel\xAE oneCCL Bindings for PyTorch installation:"),bt=p(),_e=o("p"),mn=i("Wheel files are available for the following Python versions:"),xt=p(),j=o("table"),tt=o("thead"),u=o("tr"),ue=o("th"),vn=i("Extension Version"),gn=p(),me=o("th"),bn=i("Python 3.6"),xn=p(),ve=o("th"),yn=i("Python 3.7"),wn=p(),ge=o("th"),$n=i("Python 3.8"),En=p(),be=o("th"),Pn=i("Python 3.9"),Tn=p(),xe=o("th"),Cn=i("Python 3.10"),kn=p(),U=o("tbody"),m=o("tr"),ye=o("td"),Dn=i("1.12.0"),An=p(),nt=o("td"),In=p(),we=o("td"),Ln=i("\u221A"),Rn=p(),$e=o("td"),Mn=i("\u221A"),Un=p(),Ee=o("td"),Nn=i("\u221A"),On=p(),Pe=o("td"),Sn=i("\u221A"),qn=p(),v=o("tr"),Te=o("td"),Hn=i("1.11.0"),Wn=p(),ot=o("td"),jn=p(),Ce=o("td"),Bn=i("\u221A"),Kn=p(),ke=o("td"),Gn=i("\u221A"),zn=p(),De=o("td"),Vn=i("\u221A"),Xn=p(),Ae=o("td"),Fn=i("\u221A"),Jn=p(),g=o("tr"),Ie=o("td"),Yn=i("1.10.0"),Qn=p(),Le=o("td"),Zn=i("\u221A"),eo=p(),Re=o("td"),to=i("\u221A"),no=p(),Me=o("td"),oo=i("\u221A"),ro=p(),Ue=o("td"),lo=i("\u221A"),ao=p(),rt=o("td"),yt=p(),E(ee.$$.fragment),wt=p(),L=o("p"),io=i("where "),lt=o("code"),so=i("{pytorch_version}"),co=i(` should be your PyTorch version, for instance 1.12.0.
Check more approaches for `),te=o("a"),po=i("oneccl_bind_pt installation"),ho=i(`.
Versions of oneCCL and PyTorch must match.`),$t=p(),E(B.$$.fragment),Et=p(),N=o("h2"),K=o("a"),at=o("span"),E(ne.$$.fragment),fo=p(),it=o("span"),_o=i("Intel\xAE MPI library"),Pt=i(`

Use this standards-based MPI implementation to deliver flexible, efficient, scalable cluster messaging on Intel\xAE architecture. This component is part of the Intel\xAE oneAPI HPC Toolkit.
`),Ne=o("p"),uo=i("oneccl_bindings_for_pytorch is installed along with the MPI tool set. Need to source the environment before using it."),Tt=p(),Oe=o("p"),mo=i("for Intel\xAE oneCCL 1.12.0"),Ct=p(),E(oe.$$.fragment),kt=p(),Se=o("p"),vo=i("for Intel\xAE oneCCL whose version < 1.12.0"),Dt=p(),E(re.$$.fragment),At=p(),qe=o("p"),go=i("The following \u201CUsage in Trainer\u201D takes mpirun in Intel\xAE MPI library as an example."),It=p(),O=o("h2"),G=o("a"),st=o("span"),E(le.$$.fragment),bo=p(),ct=o("span"),xo=i("Usage in Trainer"),Lt=i(`

To enable multi CPU distributed training in the Trainer with the ccl backend, users should add **\`--xpu_backend ccl\`** in the command arguments.
`),ae=o("p"),yo=i("Let\u2019s see an example with the "),ie=o("a"),wo=i("question-answering example"),Rt=p(),He=o("p"),$o=i("The following command enables training with 2 processes on one Xeon node, with one process running per one socket. The variables OMP_NUM_THREADS/CCL_WORKER_COUNT can be tuned for optimal performance."),Mt=p(),E(se.$$.fragment),Ut=p(),We=o("p"),Eo=i("The following command enables training with a total of four processes on two Xeons (node0 and node1, taking node0 as the main process), ppn (processes per node) is set to 2, with one process running per one socket. The variables OMP_NUM_THREADS/CCL_WORKER_COUNT can be tuned for optimal performance."),Nt=p(),je=o("p"),Po=i("In node0, you need to create a configuration file which contains the IP addresses of each node (for example hostfile) and pass that configuration file path as an argument."),Ot=p(),E(ce.$$.fragment),St=p(),z=o("p"),To=i("Now, run the following command in node0 and "),pt=o("strong"),Co=i("4DDP"),ko=i(" will be enabled in node0 and node1:"),qt=p(),E(pe.$$.fragment),this.h()},l(e){const a=Ur('[data-svelte="svelte-1phssyn"]',document.head);d=r(a,"META",{name:!0,content:!0}),a.forEach(n),S=h(e),_=r(e,"H1",{class:!0});var he=l(_);b=r(he,"A",{id:!0,class:!0,href:!0});var Ao=l(b);Ve=r(Ao,"SPAN",{});var Io=l(Ve);P(V.$$.fragment,Io),Io.forEach(n),Ao.forEach(n),Xt=h(he),Xe=r(he,"SPAN",{});var Lo=l(Xe);Ft=s(Lo,"Efficient Training on Multiple CPUs"),Lo.forEach(n),he.forEach(n),dt=h(e),de=r(e,"P",{});var Ro=l(de);Jt=s(Ro,"When training on a single CPU is too slow, we can use multiple CPUs. This guide focuses on PyTorch-based DDP enabling distributed CPU training efficiently."),Ro.forEach(n),_t=h(e),R=r(e,"H2",{class:!0});var Wt=l(R);q=r(Wt,"A",{id:!0,class:!0,href:!0});var Mo=l(q);Fe=r(Mo,"SPAN",{});var Uo=l(Fe);P(X.$$.fragment,Uo),Uo.forEach(n),Mo.forEach(n),Yt=h(Wt),Je=r(Wt,"SPAN",{});var No=l(Je);Qt=s(No,"Intel\xAE oneCCL Bindings for PyTorch"),No.forEach(n),Wt.forEach(n),ut=h(e),A=r(e,"P",{});var fe=l(A);F=r(fe,"A",{href:!0,rel:!0});var Oo=l(F);Zt=s(Oo,"Intel\xAE oneCCL"),Oo.forEach(n),en=s(fe," (collective communications library) is a library for efficient distributed deep learning training implementing such collectives like allreduce, allgather, alltoall. For more information on oneCCL, please refer to the "),J=r(fe,"A",{href:!0,rel:!0});var So=l(J);tn=s(So,"oneCCL documentation"),So.forEach(n),nn=s(fe," and "),Y=r(fe,"A",{href:!0,rel:!0});var qo=l(Y);on=s(qo,"oneCCL specification"),qo.forEach(n),rn=s(fe,"."),fe.forEach(n),mt=h(e),I=r(e,"P",{});var Be=l(I);ln=s(Be,"Module "),Ye=r(Be,"CODE",{});var Ho=l(Ye);an=s(Ho,"oneccl_bindings_for_pytorch"),Ho.forEach(n),sn=s(Be," ("),Qe=r(Be,"CODE",{});var Wo=l(Qe);cn=s(Wo,"torch_ccl"),Wo.forEach(n),pn=s(Be," before version 1.12)  implements PyTorch C10D ProcessGroup API and can be dynamically loaded as external ProcessGroup and only works on Linux platform now"),Be.forEach(n),vt=h(e),H=r(e,"P",{});var jt=l(H);hn=s(jt,"Check more detailed information for "),Q=r(jt,"A",{href:!0,rel:!0});var jo=l(Q);fn=s(jo,"oneccl_bind_pt"),jo.forEach(n),dn=s(jt,"."),jt.forEach(n),gt=h(e),M=r(e,"H3",{class:!0});var Bt=l(M);W=r(Bt,"A",{id:!0,class:!0,href:!0});var Bo=l(W);Ze=r(Bo,"SPAN",{});var Ko=l(Ze);P(Z.$$.fragment,Ko),Ko.forEach(n),Bo.forEach(n),_n=h(Bt),et=r(Bt,"SPAN",{});var Go=l(et);un=s(Go,"Intel\xAE oneCCL Bindings for PyTorch installation:"),Go.forEach(n),Bt.forEach(n),bt=h(e),_e=r(e,"P",{});var zo=l(_e);mn=s(zo,"Wheel files are available for the following Python versions:"),zo.forEach(n),xt=h(e),j=r(e,"TABLE",{});var Kt=l(j);tt=r(Kt,"THEAD",{});var Vo=l(tt);u=r(Vo,"TR",{});var x=l(u);ue=r(x,"TH",{align:!0});var Xo=l(ue);vn=s(Xo,"Extension Version"),Xo.forEach(n),gn=h(x),me=r(x,"TH",{align:!0});var Fo=l(me);bn=s(Fo,"Python 3.6"),Fo.forEach(n),xn=h(x),ve=r(x,"TH",{align:!0});var Jo=l(ve);yn=s(Jo,"Python 3.7"),Jo.forEach(n),wn=h(x),ge=r(x,"TH",{align:!0});var Yo=l(ge);$n=s(Yo,"Python 3.8"),Yo.forEach(n),En=h(x),be=r(x,"TH",{align:!0});var Qo=l(be);Pn=s(Qo,"Python 3.9"),Qo.forEach(n),Tn=h(x),xe=r(x,"TH",{align:!0});var Zo=l(xe);Cn=s(Zo,"Python 3.10"),Zo.forEach(n),x.forEach(n),Vo.forEach(n),kn=h(Kt),U=r(Kt,"TBODY",{});var Ke=l(U);m=r(Ke,"TR",{});var y=l(m);ye=r(y,"TD",{align:!0});var er=l(ye);Dn=s(er,"1.12.0"),er.forEach(n),An=h(y),nt=r(y,"TD",{align:!0}),l(nt).forEach(n),In=h(y),we=r(y,"TD",{align:!0});var tr=l(we);Ln=s(tr,"\u221A"),tr.forEach(n),Rn=h(y),$e=r(y,"TD",{align:!0});var nr=l($e);Mn=s(nr,"\u221A"),nr.forEach(n),Un=h(y),Ee=r(y,"TD",{align:!0});var or=l(Ee);Nn=s(or,"\u221A"),or.forEach(n),On=h(y),Pe=r(y,"TD",{align:!0});var rr=l(Pe);Sn=s(rr,"\u221A"),rr.forEach(n),y.forEach(n),qn=h(Ke),v=r(Ke,"TR",{});var w=l(v);Te=r(w,"TD",{align:!0});var lr=l(Te);Hn=s(lr,"1.11.0"),lr.forEach(n),Wn=h(w),ot=r(w,"TD",{align:!0}),l(ot).forEach(n),jn=h(w),Ce=r(w,"TD",{align:!0});var ar=l(Ce);Bn=s(ar,"\u221A"),ar.forEach(n),Kn=h(w),ke=r(w,"TD",{align:!0});var ir=l(ke);Gn=s(ir,"\u221A"),ir.forEach(n),zn=h(w),De=r(w,"TD",{align:!0});var sr=l(De);Vn=s(sr,"\u221A"),sr.forEach(n),Xn=h(w),Ae=r(w,"TD",{align:!0});var cr=l(Ae);Fn=s(cr,"\u221A"),cr.forEach(n),w.forEach(n),Jn=h(Ke),g=r(Ke,"TR",{});var $=l(g);Ie=r($,"TD",{align:!0});var pr=l(Ie);Yn=s(pr,"1.10.0"),pr.forEach(n),Qn=h($),Le=r($,"TD",{align:!0});var hr=l(Le);Zn=s(hr,"\u221A"),hr.forEach(n),eo=h($),Re=r($,"TD",{align:!0});var fr=l(Re);to=s(fr,"\u221A"),fr.forEach(n),no=h($),Me=r($,"TD",{align:!0});var dr=l(Me);oo=s(dr,"\u221A"),dr.forEach(n),ro=h($),Ue=r($,"TD",{align:!0});var _r=l(Ue);lo=s(_r,"\u221A"),_r.forEach(n),ao=h($),rt=r($,"TD",{align:!0}),l(rt).forEach(n),$.forEach(n),Ke.forEach(n),Kt.forEach(n),yt=h(e),P(ee.$$.fragment,e),wt=h(e),L=r(e,"P",{});var Ge=l(L);io=s(Ge,"where "),lt=r(Ge,"CODE",{});var ur=l(lt);so=s(ur,"{pytorch_version}"),ur.forEach(n),co=s(Ge,` should be your PyTorch version, for instance 1.12.0.
Check more approaches for `),te=r(Ge,"A",{href:!0,rel:!0});var mr=l(te);po=s(mr,"oneccl_bind_pt installation"),mr.forEach(n),ho=s(Ge,`.
Versions of oneCCL and PyTorch must match.`),Ge.forEach(n),$t=h(e),P(B.$$.fragment,e),Et=h(e),N=r(e,"H2",{class:!0});var Gt=l(N);K=r(Gt,"A",{id:!0,class:!0,href:!0});var vr=l(K);at=r(vr,"SPAN",{});var gr=l(at);P(ne.$$.fragment,gr),gr.forEach(n),vr.forEach(n),fo=h(Gt),it=r(Gt,"SPAN",{});var br=l(it);_o=s(br,"Intel\xAE MPI library"),br.forEach(n),Gt.forEach(n),Pt=s(e,`

Use this standards-based MPI implementation to deliver flexible, efficient, scalable cluster messaging on Intel\xAE architecture. This component is part of the Intel\xAE oneAPI HPC Toolkit.
`),Ne=r(e,"P",{});var xr=l(Ne);uo=s(xr,"oneccl_bindings_for_pytorch is installed along with the MPI tool set. Need to source the environment before using it."),xr.forEach(n),Tt=h(e),Oe=r(e,"P",{});var yr=l(Oe);mo=s(yr,"for Intel\xAE oneCCL 1.12.0"),yr.forEach(n),Ct=h(e),P(oe.$$.fragment,e),kt=h(e),Se=r(e,"P",{});var wr=l(Se);vo=s(wr,"for Intel\xAE oneCCL whose version < 1.12.0"),wr.forEach(n),Dt=h(e),P(re.$$.fragment,e),At=h(e),qe=r(e,"P",{});var $r=l(qe);go=s($r,"The following \u201CUsage in Trainer\u201D takes mpirun in Intel\xAE MPI library as an example."),$r.forEach(n),It=h(e),O=r(e,"H2",{class:!0});var zt=l(O);G=r(zt,"A",{id:!0,class:!0,href:!0});var Er=l(G);st=r(Er,"SPAN",{});var Pr=l(st);P(le.$$.fragment,Pr),Pr.forEach(n),Er.forEach(n),bo=h(zt),ct=r(zt,"SPAN",{});var Tr=l(ct);xo=s(Tr,"Usage in Trainer"),Tr.forEach(n),zt.forEach(n),Lt=s(e,`

To enable multi CPU distributed training in the Trainer with the ccl backend, users should add **\`--xpu_backend ccl\`** in the command arguments.
`),ae=r(e,"P",{});var Do=l(ae);yo=s(Do,"Let\u2019s see an example with the "),ie=r(Do,"A",{href:!0,rel:!0});var Cr=l(ie);wo=s(Cr,"question-answering example"),Cr.forEach(n),Do.forEach(n),Rt=h(e),He=r(e,"P",{});var kr=l(He);$o=s(kr,"The following command enables training with 2 processes on one Xeon node, with one process running per one socket. The variables OMP_NUM_THREADS/CCL_WORKER_COUNT can be tuned for optimal performance."),kr.forEach(n),Mt=h(e),P(se.$$.fragment,e),Ut=h(e),We=r(e,"P",{});var Dr=l(We);Eo=s(Dr,"The following command enables training with a total of four processes on two Xeons (node0 and node1, taking node0 as the main process), ppn (processes per node) is set to 2, with one process running per one socket. The variables OMP_NUM_THREADS/CCL_WORKER_COUNT can be tuned for optimal performance."),Dr.forEach(n),Nt=h(e),je=r(e,"P",{});var Ar=l(je);Po=s(Ar,"In node0, you need to create a configuration file which contains the IP addresses of each node (for example hostfile) and pass that configuration file path as an argument."),Ar.forEach(n),Ot=h(e),P(ce.$$.fragment,e),St=h(e),z=r(e,"P",{});var Vt=l(z);To=s(Vt,"Now, run the following command in node0 and "),pt=r(Vt,"STRONG",{});var Ir=l(pt);Co=s(Ir,"4DDP"),Ir.forEach(n),ko=s(Vt," will be enabled in node0 and node1:"),Vt.forEach(n),qt=h(e),P(pe.$$.fragment,e),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Hr)),c(b,"id","efficient-training-on-multiple-cpus"),c(b,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(b,"href","#efficient-training-on-multiple-cpus"),c(_,"class","relative group"),c(q,"id","intel-oneccl-bindings-for-pytorch"),c(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(q,"href","#intel-oneccl-bindings-for-pytorch"),c(R,"class","relative group"),c(F,"href","https://github.com/oneapi-src/oneCCL"),c(F,"rel","nofollow"),c(J,"href","https://spec.oneapi.com/versions/latest/elements/oneCCL/source/index.html"),c(J,"rel","nofollow"),c(Y,"href","https://spec.oneapi.com/versions/latest/elements/oneCCL/source/index.html"),c(Y,"rel","nofollow"),c(Q,"href","https://github.com/intel/torch-ccl"),c(Q,"rel","nofollow"),c(W,"id","intel-oneccl-bindings-for-pytorch-installation"),c(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(W,"href","#intel-oneccl-bindings-for-pytorch-installation"),c(M,"class","relative group"),c(ue,"align","center"),c(me,"align","center"),c(ve,"align","center"),c(ge,"align","center"),c(be,"align","center"),c(xe,"align","center"),c(ye,"align","center"),c(nt,"align","center"),c(we,"align","center"),c($e,"align","center"),c(Ee,"align","center"),c(Pe,"align","center"),c(Te,"align","center"),c(ot,"align","center"),c(Ce,"align","center"),c(ke,"align","center"),c(De,"align","center"),c(Ae,"align","center"),c(Ie,"align","center"),c(Le,"align","center"),c(Re,"align","center"),c(Me,"align","center"),c(Ue,"align","center"),c(rt,"align","center"),c(te,"href","https://github.com/intel/torch-ccl"),c(te,"rel","nofollow"),c(K,"id","intel-mpi-library"),c(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(K,"href","#intel-mpi-library"),c(N,"class","relative group"),c(G,"id","usage-in-trainer"),c(G,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(G,"href","#usage-in-trainer"),c(O,"class","relative group"),c(ie,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),c(ie,"rel","nofollow")},m(e,a){t(document.head,d),f(e,S,a),f(e,_,a),t(_,b),t(b,Ve),T(V,Ve,null),t(_,Xt),t(_,Xe),t(Xe,Ft),f(e,dt,a),f(e,de,a),t(de,Jt),f(e,_t,a),f(e,R,a),t(R,q),t(q,Fe),T(X,Fe,null),t(R,Yt),t(R,Je),t(Je,Qt),f(e,ut,a),f(e,A,a),t(A,F),t(F,Zt),t(A,en),t(A,J),t(J,tn),t(A,nn),t(A,Y),t(Y,on),t(A,rn),f(e,mt,a),f(e,I,a),t(I,ln),t(I,Ye),t(Ye,an),t(I,sn),t(I,Qe),t(Qe,cn),t(I,pn),f(e,vt,a),f(e,H,a),t(H,hn),t(H,Q),t(Q,fn),t(H,dn),f(e,gt,a),f(e,M,a),t(M,W),t(W,Ze),T(Z,Ze,null),t(M,_n),t(M,et),t(et,un),f(e,bt,a),f(e,_e,a),t(_e,mn),f(e,xt,a),f(e,j,a),t(j,tt),t(tt,u),t(u,ue),t(ue,vn),t(u,gn),t(u,me),t(me,bn),t(u,xn),t(u,ve),t(ve,yn),t(u,wn),t(u,ge),t(ge,$n),t(u,En),t(u,be),t(be,Pn),t(u,Tn),t(u,xe),t(xe,Cn),t(j,kn),t(j,U),t(U,m),t(m,ye),t(ye,Dn),t(m,An),t(m,nt),t(m,In),t(m,we),t(we,Ln),t(m,Rn),t(m,$e),t($e,Mn),t(m,Un),t(m,Ee),t(Ee,Nn),t(m,On),t(m,Pe),t(Pe,Sn),t(U,qn),t(U,v),t(v,Te),t(Te,Hn),t(v,Wn),t(v,ot),t(v,jn),t(v,Ce),t(Ce,Bn),t(v,Kn),t(v,ke),t(ke,Gn),t(v,zn),t(v,De),t(De,Vn),t(v,Xn),t(v,Ae),t(Ae,Fn),t(U,Jn),t(U,g),t(g,Ie),t(Ie,Yn),t(g,Qn),t(g,Le),t(Le,Zn),t(g,eo),t(g,Re),t(Re,to),t(g,no),t(g,Me),t(Me,oo),t(g,ro),t(g,Ue),t(Ue,lo),t(g,ao),t(g,rt),f(e,yt,a),T(ee,e,a),f(e,wt,a),f(e,L,a),t(L,io),t(L,lt),t(lt,so),t(L,co),t(L,te),t(te,po),t(L,ho),f(e,$t,a),T(B,e,a),f(e,Et,a),f(e,N,a),t(N,K),t(K,at),T(ne,at,null),t(N,fo),t(N,it),t(it,_o),f(e,Pt,a),f(e,Ne,a),t(Ne,uo),f(e,Tt,a),f(e,Oe,a),t(Oe,mo),f(e,Ct,a),T(oe,e,a),f(e,kt,a),f(e,Se,a),t(Se,vo),f(e,Dt,a),T(re,e,a),f(e,At,a),f(e,qe,a),t(qe,go),f(e,It,a),f(e,O,a),t(O,G),t(G,st),T(le,st,null),t(O,bo),t(O,ct),t(ct,xo),f(e,Lt,a),f(e,ae,a),t(ae,yo),t(ae,ie),t(ie,wo),f(e,Rt,a),f(e,He,a),t(He,$o),f(e,Mt,a),T(se,e,a),f(e,Ut,a),f(e,We,a),t(We,Eo),f(e,Nt,a),f(e,je,a),t(je,Po),f(e,Ot,a),T(ce,e,a),f(e,St,a),f(e,z,a),t(z,To),t(z,pt),t(pt,Co),t(z,ko),f(e,qt,a),T(pe,e,a),Ht=!0},p(e,[a]){const he={};a&2&&(he.$$scope={dirty:a,ctx:e}),B.$set(he)},i(e){Ht||(C(V.$$.fragment,e),C(X.$$.fragment,e),C(Z.$$.fragment,e),C(ee.$$.fragment,e),C(B.$$.fragment,e),C(ne.$$.fragment,e),C(oe.$$.fragment,e),C(re.$$.fragment,e),C(le.$$.fragment,e),C(se.$$.fragment,e),C(ce.$$.fragment,e),C(pe.$$.fragment,e),Ht=!0)},o(e){k(V.$$.fragment,e),k(X.$$.fragment,e),k(Z.$$.fragment,e),k(ee.$$.fragment,e),k(B.$$.fragment,e),k(ne.$$.fragment,e),k(oe.$$.fragment,e),k(re.$$.fragment,e),k(le.$$.fragment,e),k(se.$$.fragment,e),k(ce.$$.fragment,e),k(pe.$$.fragment,e),Ht=!1},d(e){n(d),e&&n(S),e&&n(_),D(V),e&&n(dt),e&&n(de),e&&n(_t),e&&n(R),D(X),e&&n(ut),e&&n(A),e&&n(mt),e&&n(I),e&&n(vt),e&&n(H),e&&n(gt),e&&n(M),D(Z),e&&n(bt),e&&n(_e),e&&n(xt),e&&n(j),e&&n(yt),D(ee,e),e&&n(wt),e&&n(L),e&&n($t),D(B,e),e&&n(Et),e&&n(N),D(ne),e&&n(Pt),e&&n(Ne),e&&n(Tt),e&&n(Oe),e&&n(Ct),D(oe,e),e&&n(kt),e&&n(Se),e&&n(Dt),D(re,e),e&&n(At),e&&n(qe),e&&n(It),e&&n(O),D(le),e&&n(Lt),e&&n(ae),e&&n(Rt),e&&n(He),e&&n(Mt),D(se,e),e&&n(Ut),e&&n(We),e&&n(Nt),e&&n(je),e&&n(Ot),D(ce,e),e&&n(St),e&&n(z),e&&n(qt),D(pe,e)}}}const Hr={local:"efficient-training-on-multiple-cpus",sections:[{local:"intel-oneccl-bindings-for-pytorch",sections:[{local:"intel-oneccl-bindings-for-pytorch-installation",title:"Intel\xAE oneCCL Bindings for PyTorch installation:"}],title:"Intel\xAE oneCCL Bindings for PyTorch"},{local:"intel-mpi-library",title:"Intel\xAE MPI library"},{local:"usage-in-trainer",title:"Usage in Trainer"}],title:"Efficient Training on Multiple CPUs"};function Wr(ft){return Nr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zr extends Lr{constructor(d){super();Rr(this,d,Wr,qr,Mr,{})}}export{zr as default,Hr as metadata};
