Skip to content

Conversation

jithunnair-amd
Copy link
Collaborator

@jithunnair-amd jithunnair-amd commented Feb 9, 2022

  1. Fix JIT path of building PyTorch extensions
  2. includes/ignores must be absolute paths to handle JIT path
  3. Use absolute paths for all files to allow for absolute paths in
    includes/ignores
  4. Limit hipification to build_dir for non-JIT path
  5. Ignore ROCm/PyTorch headers during hipification of
    header_include_dirs for JIT path
  6. Update hipify output with clearer status
  7. Don't include files ignored by hipify in hipify output to control verbosity of hipify output
  8. Define HIP flags in cflags for JIT path as well

Fixes https://github.com/ROCmSoftwarePlatform/frameworks-internal/issues/276 and SWDEV-318084

1. Fix JIT path of building PyTorch extensions
2. Use absolute paths for all files to allow for absolute paths in
includes/ignores
3. Limit hipification to build_dir for non-JIT path
4. Ignore ROCm/PyTorch headers during hipification of
header_include_dirs for JIT path
5. Update hipify output with clearer status
6. Don't include files ignored by hipify in output
7. Define HIP flags in cflags for JIT path as well
@jithunnair-amd
Copy link
Collaborator Author

Below are the build and test logs for apex, torchvision and deepspeed (jit and non-jit).

DeepSpeed:
deepspeed_non_jit.build.log
deepspeed_non_jit.test.log
deepspeed_jit.build.log
deepspeed_extensions_jit.build.log
deepspeed_jit.test.log
Torchvision:
torchvision.build.log
torchvision.test.log
Apex:
apex.build.log
apex.test.log

The following testcase was used for the DeepSpeed JIT extension build:

import deepspeed
deepspeed.ops.op_builder.FusedAdamBuilder().load()
deepspeed.ops.op_builder.CPUAdamBuilder().load()
deepspeed.ops.op_builder.FusedLambBuilder().load()
deepspeed.ops.op_builder.TransformerBuilder().load()
deepspeed.ops.op_builder.StochasticTransformerBuilder().load()
deepspeed.ops.op_builder.UtilsBuilder().load()

…ch build; explicitly require relative paths for certain helper functions
@jithunnair-amd
Copy link
Collaborator Author

test pytorch/apex/torchvision/deepspeed please

@jithunnair-amd
Copy link
Collaborator Author

Tested PyTorch/apex/torchvision/deepspeed(JIT/non-JIT) builds and tests in http://rocmhead.amd.com:8080/job/pytorch/job/pytorch-ci/64/

@jithunnair-amd jithunnair-amd merged commit 7bb56db into ROCm:release/1.10 Feb 14, 2022
@jithunnair-amd jithunnair-amd deleted the hipify_jit_and_other_fixes branch February 14, 2022 07:56
@jithunnair-amd jithunnair-amd changed the title Fix JIT path for Pytorch extensions and other hipify fixes Fix JIT path for Pytorch extensions and other hipify fixes (release/1.10) Feb 14, 2022
jithunnair-amd added a commit to jithunnair-amd/pytorch that referenced this pull request Sep 20, 2022
* Various hipify-related fixes:
1. Fix JIT path of building PyTorch extensions
2. Use absolute paths for all files to allow for absolute paths in
includes/ignores
3. Limit hipification to build_dir for non-JIT path
4. Ignore ROCm/PyTorch headers during hipification of
header_include_dirs for JIT path
5. Update hipify output with clearer status
6. Don't include files ignored by hipify in output
7. Define HIP flags in cflags for JIT path as well
8. Ensure includes and ignores are passed in as absolute paths for pytorch build; explicitly require relative paths for certain helper functions
jithunnair-amd added a commit that referenced this pull request Sep 28, 2022
* Various hipify-related fixes:
1. Fix JIT path of building PyTorch extensions
2. Use absolute paths for all files to allow for absolute paths in
includes/ignores
3. Limit hipification to build_dir for non-JIT path
4. Ignore ROCm/PyTorch headers during hipification of
header_include_dirs for JIT path
5. Update hipify output with clearer status
6. Don't include files ignored by hipify in output
7. Define HIP flags in cflags for JIT path as well
8. Ensure includes and ignores are passed in as absolute paths for pytorch build; explicitly require relative paths for certain helper functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant