DeepSpeed
9dfb06de - Resolve any '..' in the file paths using os.path.abspath() (#4709)

Commit
2 years ago
Resolve any '..' in the file paths using os.path.abspath() (#4709) This PR is to resolve any '..' in the file paths like below using os.path.abspath() ``` sources: ['/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/core_ops.cpp', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/bias_activations/bias_activation.cpp', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/bias_activations/bias_activation.cu', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/cuda_layer_norm/layer_norm.cpp', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/cuda_layer_norm/layer_norm.cu', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/cuda_rms_norm/rms_norm.cpp', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/cuda_rms_norm/rms_norm.cu', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/gated_activations/gated_activation_kernels.cpp', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/gated_activations/gated_activation_kernels.cu'] extra_include_paths: ['/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/includes', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/bias_activations', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/blas_kernels', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/cuda_layer_norm', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/cuda_rms_norm', '/opt/conda/envs/py_3.9/lib/python3.9/site-packages/deepspeed/ops/../inference/v2/kernels/core_ops/gated_activations'] ``` It fixes the hipify errors that occur during JIT build of 'inference_core_ops' extension due to ".." prefix in the paths, https://github.com/microsoft/DeepSpeed/blob/0ec2d3e4bfa2d0a5237e9747da1ef9d5e4a4453b/op_builder/inference_core_ops.py#L73 https://github.com/microsoft/DeepSpeed/blob/0ec2d3e4bfa2d0a5237e9747da1ef9d5e4a4453b/op_builder/inference_core_ops.py#L90 cc @jithunnair-amd Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com> Co-authored-by: Olatunji Ruwase <olruwase@microsoft.com>
Author
Parents
Loading