Migration Operations

  1. Create an Ascend training project.
    1. Choose File > New > Project... on the menu bar. The New Project window is displayed. Set corresponding parameters, as shown in Figure 1. Click Next.
      • CANN Version: CANN package version. If the version is not identified or you want to change the version, click Change and select the Ascend-CANN-Toolkit installation path (to the version number or latest level) in the dialog box displayed.
      • Templates: framework project. Select MindSpore Project.
      Figure 1 Project creation
    2. Configure related information and click Create. See Figure 2.
      • Project name: project name, which can be customized.
      • Project location: project directory. By default, the project is created in ~/MindstudioProjects.
      Figure 2 Page for configuring other information about the training project
    3. Go to the project page and click (X2MindSpore) on the toolbar.
  2. Go to the X2MindSpore parameter configuration page and set the parameters as shown in Figure 3 (conversion from PyTorch single-device to MindSpore single-device is used as an example).
    • Framework: Framework of the original script to be migrated.
    • Input Path: Path of the script file to be migrated.
    • Output Path: Output path of the script after migration.
    Figure 3 X2MindSpore configuration page
  3. After setting the parameters, click Transplant to start the migration.

    If "Transplant success!" is displayed, the migration is successful.

    2022-09-22 14:20:32  [INFO]    Adapter package has been copy to the output dir, please add /home/username/MindStudioProjects/MyTraining-mindspore/pytorch-cifar_x2ms to PYTHONPATH before training.
    2022-09-22 14:20:32  [INFO]    X2MindSpore run success, welcome to the next use.
    2022-09-22 14:20:32  Transplant success!