From 19e83d174c1e2802a459c9b5831628817e1c286f Mon Sep 17 00:00:00 2001 From: jiqing-feng <107918818+jiqing-feng@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:55:48 +0800 Subject: [PATCH] Doc (#28431) * update version for cpu training * update docs for cpu training * fix readme * fix readme --- docs/source/en/perf_train_cpu.md | 22 ++++++++++++++++++---- docs/source/en/perf_train_cpu_many.md | 7 ++++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/source/en/perf_train_cpu.md b/docs/source/en/perf_train_cpu.md index 9c81820ce7..d05e852f6b 100644 --- a/docs/source/en/perf_train_cpu.md +++ b/docs/source/en/perf_train_cpu.md @@ -31,14 +31,16 @@ IPEX release is following PyTorch, to install via pip: | PyTorch Version | IPEX version | | :---------------: | :----------: | +| 2.1.x | 2.1.100+cpu | +| 2.0.x | 2.0.100+cpu | | 1.13 | 1.13.0+cpu | | 1.12 | 1.12.300+cpu | -| 1.11 | 1.11.200+cpu | -| 1.10 | 1.10.100+cpu | +Please run `pip list | grep torch` to get your `pytorch_version`, so you can get the `IPEX version_name`. ``` pip install intel_extension_for_pytorch== -f https://developer.intel.com/ipex-whl-stable-cpu ``` +You can check the latest versions in [ipex-whl-stable-cpu](https://developer.intel.com/ipex-whl-stable-cpu) if needed. Check more approaches for [IPEX installation](https://intel.github.io/intel-extension-for-pytorch/cpu/latest/tutorials/installation.html). @@ -59,8 +61,20 @@ Take an example of the use cases on [Transformers question-answering](https://gi --max_seq_length 384 \ --doc_stride 128 \ --output_dir /tmp/debug_squad/ \ ---use_ipex \ ---bf16 --no_cuda +--use_ipex \ +--bf16 \ +--use_cpu + +If you want to enable `use_ipex` and `bf16` in your script, add these parameters to `TrainingArguments` like this: +```diff +training_args = TrainingArguments( + output_dir=args.output_path, ++ bf16=True, ++ use_ipex=True, ++ use_cpu=True, + **kwargs +) +``` ### Practice example diff --git a/docs/source/en/perf_train_cpu_many.md b/docs/source/en/perf_train_cpu_many.md index 4c5ffa35cd..8b938921cb 100644 --- a/docs/source/en/perf_train_cpu_many.md +++ b/docs/source/en/perf_train_cpu_many.md @@ -32,16 +32,17 @@ Wheel files are available for the following Python versions: | Extension Version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 | Python 3.10 | | :---------------: | :--------: | :--------: | :--------: | :--------: | :---------: | +| 2.1.0 | | √ | √ | √ | √ | +| 2.0.0 | | √ | √ | √ | √ | | 1.13.0 | | √ | √ | √ | √ | | 1.12.100 | | √ | √ | √ | √ | | 1.12.0 | | √ | √ | √ | √ | -| 1.11.0 | | √ | √ | √ | √ | -| 1.10.0 | √ | √ | √ | √ | | +Please run `pip list | grep torch` to get your `pytorch_version`. ``` pip install oneccl_bind_pt=={pytorch_version} -f https://developer.intel.com/ipex-whl-stable-cpu ``` -where `{pytorch_version}` should be your PyTorch version, for instance 1.13.0. +where `{pytorch_version}` should be your PyTorch version, for instance 2.1.0. Check more approaches for [oneccl_bind_pt installation](https://github.com/intel/torch-ccl). Versions of oneCCL and PyTorch must match.