From 74ef784fd151eed4e13f920aa4a86a8cd7280369 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Sat, 30 Sep 2023 10:11:14 +0800 Subject: [PATCH 01/18] add api mapping --- .../pytorch_api_mapping_cn.md | 89 ++++++++++--------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index 70df36f9755..73721b58b05 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1031,48 +1031,53 @@ ## torch.cuda.XX API 映射列表 梳理了`torch.cuda.XX`类 API 的 PyTorch-PaddlePaddle API 映射列表。 -| 序号 | PyTorch API | PaddlePaddle API | 备注 | -|----| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| 1 | [torch.cuda.max_memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_allocated.html?highlight=max_memory_allocated#torch.cuda.max_memory_allocated) | [paddle.device.cuda.max_memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/max_memory_allocated_cn.html) | 功能一致,参数一致 | -| 2 | [torch.cuda.Event](https://pytorch.org/docs/stable/generated/torch.cuda.Event.html#torch.cuda.Event) | [paddle.device.cuda.Event](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/Event_cn.html#event) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Event.md) | -| 3 | [torch.cuda.current_device](https://pytorch.org/docs/stable/generated/torch.cuda.current_device.html#torch.cuda.current_device) | [paddle.framework._current_expected_place]() | 功能一致,无参数 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.current_device.md) | -| 4 | [torch.cuda.current_stream](https://pytorch.org/docs/stable/generated/torch.cuda.current_stream.html#torch.cuda.current_stream) | [paddle.device.cuda.current_stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/current_stream_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.current_stream.md) | -| 5 | [torch.cuda.device_count](https://pytorch.org/docs/stable/generated/torch.cuda.device_count.html#torch.cuda.device_count) | [paddle.device.cuda.device_count](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/device_count_cn.html) | 功能一致,无参数 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.device_count.md) | -| 6 | [torch.cuda.get_device_capability](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_capability.html#torch.cuda.get_device_capability) | [paddle.device.cuda.get_device_capability](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/get_device_capability_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_device_capability.md) | -| 7 | [torch.cuda.get_device_properties](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_properties.html#torch.cuda.get_device_properties) | [paddle.device.cuda.get_device_properties](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/get_device_properties_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_device_properties.md) | -| 8 | [torch.cuda.set_device](https://pytorch.org/docs/stable/generated/torch.cuda.set_device.html#torch.cuda.set_device) | [paddle.device.set_device](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/set_device_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.set_device.md) | -| 9 | [torch.cuda.empty_cache](https://pytorch.org/docs/stable/generated/torch.cuda.empty_cache.html#torch.cuda.empty_cache) | [paddle.device.cuda.empty_cache](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/empty_cache_cn.html) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.empty_cache.md) | -| 10 | [torch.cuda.manual_seed](https://pytorch.org/docs/stable/generated/torch.cuda.manual_seed.html#torch.cuda.manual_seed) | [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.manual_seed.md) | -| 11 | [torch.cuda.max_memory_reserved](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_reserved.html#torch.cuda.max_memory_reserved) | [paddle.device.cuda.max_memory_reserved](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/max_memory_reserved_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.max_memory_reserved.md) | -| 12 | [torch.cuda.max_memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_allocated.html#torch.cuda.max_memory_allocated) | [paddle.device.cuda.max_memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/max_memory_allocated_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.max_memory_allocated.md) | -| 13 | [torch.cuda.memory_reserved](https://pytorch.org/docs/stable/generated/torch.cuda.memory_reserved.html#torch.cuda.memory_reserved) | [paddle.device.cuda.memory_reserved](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/memory_reserved_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.memory_reserved.md) | -| 14 | [torch.cuda.memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.memory_allocated.html#torch.cuda.memory_allocated) | [paddle.device.cuda.memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/memory_allocated_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.memory_allocated.md) | -| 15 | [torch.cuda.synchronize](https://pytorch.org/docs/stable/generated/torch.cuda.synchronize.html#torch.cuda.synchronize) | [paddle.device.cuda.synchronize](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/synchronize_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.synchronize.md) | -| 16 | [torch.cuda.memory_usage](https://pytorch.org/docs/stable/generated/torch.cuda.memory_usage.html#torch.cuda.memory_usage) | | 功能缺失 | -| 17 | [torch.cuda.mem_get_info](https://pytorch.org/docs/stable/generated/torch.cuda.mem_get_info.html#torch.cuda.mem_get_info) | | 功能缺失 | -| 18 | [torch.cuda.set_rng_state](https://pytorch.org/docs/stable/generated/torch.cuda.set_rng_state.html#torch.cuda.set_rng_state) | | 功能缺失 | -| 19 | [torch.cuda.default_stream](https://pytorch.org/docs/stable/generated/torch.cuda.default_stream.html?highlight=torch+cuda+default_stream#torch.cuda.default_stream) | | 功能缺失 | -| 20 | [torch.cuda.get_arch_list](https://pytorch.org/docs/stable/generated/torch.cuda.get_arch_list.html?highlight=torch+cuda+get_arch_list#torch.cuda.get_arch_list) | | 功能缺失 | -| 21 | [torch.cuda.is_initialized](https://pytorch.org/docs/stable/generated/torch.cuda.is_initialized.html?highlight=torch+cuda+is_initialized#torch.cuda.is_initialized) | | 功能缺失 | -| 22 | [torch.cuda.StreamContext](https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html#torch.cuda.StreamContext) | | 功能缺失 | -| 23 | [torch.cuda.is_current_stream_capturing](https://pytorch.org/docs/stable/generated/torch.cuda.is_current_stream_capturing.html#torch.cuda.is_current_stream_capturing) | | 功能缺失 | -| 24 |[torch.cuda.amp.autocast](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.autocast)|[paddle.amp.auto_cast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/auto_cast_cn.html)|paddle 参数更多, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.amp.autocast.md)| -| 25 |[torch.cuda.amp.GradScaler](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.GradScaler)|[paddle.amp.GradScaler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/GradScaler_cn.html)|仅参数默认值不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.amp.GradScaler.md)| -| 26 |[torch.cuda.comm.broadcast](https://pytorch.org/docs/stable/generated/torch.cuda.comm.broadcast.html#torch.cuda.comm.broadcast)|[paddle.distributed.broadcast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/broadcast_cn.html)|torch 参数更多, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.comm.broadcast.md)| -| 27 |[torch.cuda.device](https://pytorch.org/docs/stable/generated/torch.cuda.device.html#torch.cuda.device)|[paddle.CUDAPlace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/CUDAPlace_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.device.md)| -| 28 |[torch.cuda.DoubleTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.DoubleTensor.md)| -| 29 |[torch.cuda.get_device_name](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_name.html)|[paddle.device.cuda.get_device_properties](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/get_device_properties_cn.html)| 参数不一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_device_name.md)| -| 30 |[torch.cuda.get_rng_state_all](https://pytorch.org/docs/stable/generated/torch.cuda.get_rng_state_all.html#torch.cuda.get_rng_state_all)|[paddle.get_rng_state]()|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_rng_state_all.md)| -| 31 |[torch.cuda.HalfTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.HalfTensor.md)| -| 32 |[torch.cuda.is_available](https://pytorch.org/docs/stable/generated/torch.cuda.is_available.html#torch-cuda-is-available)| | 组合替代实现 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.is_available.md)| -| 33 |[torch.cuda.manual_seed_all](https://pytorch.org/docs/2.0/generated/torch.cuda.manual_seed_all.html#torch.cuda.manual_seed_all)|[paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.manual_seed_all.md)| -| 34 |[torch.cuda.nvtx.range_pop](https://pytorch.org/docs/stable/generated/torch.cuda.nvtx.range_pop.html#torch.cuda.nvtx.range_pop)|[paddle.fluid.core.nvprof_nvtx_pop](https://github.com/PaddlePaddle/Paddle/blob/f00a06d817b97bde23e013c2fb0cd1a6c9c1076b/paddle/fluid/pybind/pybind.cc#L2264)|无参数, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.nvtx.range_pop.md)| -| 35 |[torch.cuda.nvtx.range_push](https://pytorch.org/docs/stable/generated/torch.cuda.nvtx.range_push.html?highlight=range_push#torch.cuda.nvtx.range_push)|[paddle.fluid.core.nvprof_nvtx_push](https://github.com/PaddlePaddle/Paddle/blob/f00a06d817b97bde23e013c2fb0cd1a6c9c1076b/paddle/fluid/pybind/pybind.cc#L2261)|仅参数名不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.nvtx.range_push.md)| -| 36 |[torch.cuda.set_rng_state_all](https://pytorch.org/docs/stable/generated/torch.cuda.set_rng_state_all.html#torch.cuda.set_rng_state_all)|[paddle.set_rng_state]()|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.set_rng_state_all.md)| -| 37 |[torch.cuda.set_stream](https://pytorch.org/docs/stable/generated/torch.cuda.set_stream.html#torch.cuda.set_stream)|[paddle.device.set_stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/set_stream_cn.html#set-stream)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.set_stream.md)| -| 38 |[torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md)| -| 39 |[torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html)|[paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md)| -| 40 |[torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream)|[paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md)| +| 序号 | PyTorch API | PaddlePaddle API | 备注 | +|-----|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 1 | [torch.cuda.max_memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_allocated.html?highlight=max_memory_allocated#torch.cuda.max_memory_allocated) | [paddle.device.cuda.max_memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/max_memory_allocated_cn.html) | 功能一致,参数一致 | +| 2 | [torch.cuda.Event](https://pytorch.org/docs/stable/generated/torch.cuda.Event.html#torch.cuda.Event) | [paddle.device.cuda.Event](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/Event_cn.html#event) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Event.md) | +| 3 | [torch.cuda.current_device](https://pytorch.org/docs/stable/generated/torch.cuda.current_device.html#torch.cuda.current_device) | [paddle.framework._current_expected_place]() | 功能一致,无参数 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.current_device.md) | +| 4 | [torch.cuda.current_stream](https://pytorch.org/docs/stable/generated/torch.cuda.current_stream.html#torch.cuda.current_stream) | [paddle.device.cuda.current_stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/current_stream_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.current_stream.md) | +| 5 | [torch.cuda.device_count](https://pytorch.org/docs/stable/generated/torch.cuda.device_count.html#torch.cuda.device_count) | [paddle.device.cuda.device_count](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/device_count_cn.html) | 功能一致,无参数 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.device_count.md) | +| 6 | [torch.cuda.get_device_capability](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_capability.html#torch.cuda.get_device_capability) | [paddle.device.cuda.get_device_capability](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/get_device_capability_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_device_capability.md) | +| 7 | [torch.cuda.get_device_properties](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_properties.html#torch.cuda.get_device_properties) | [paddle.device.cuda.get_device_properties](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/get_device_properties_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_device_properties.md) | +| 8 | [torch.cuda.set_device](https://pytorch.org/docs/stable/generated/torch.cuda.set_device.html#torch.cuda.set_device) | [paddle.device.set_device](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/set_device_cn.html) | 功能一致,参数完全一致 ,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.set_device.md) | +| 9 | [torch.cuda.empty_cache](https://pytorch.org/docs/stable/generated/torch.cuda.empty_cache.html#torch.cuda.empty_cache) | [paddle.device.cuda.empty_cache](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/empty_cache_cn.html) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.empty_cache.md) | +| 10 | [torch.cuda.manual_seed](https://pytorch.org/docs/stable/generated/torch.cuda.manual_seed.html#torch.cuda.manual_seed) | [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.manual_seed.md) | +| 11 | [torch.cuda.max_memory_reserved](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_reserved.html#torch.cuda.max_memory_reserved) | [paddle.device.cuda.max_memory_reserved](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/max_memory_reserved_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.max_memory_reserved.md) | +| 12 | [torch.cuda.max_memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_allocated.html#torch.cuda.max_memory_allocated) | [paddle.device.cuda.max_memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/max_memory_allocated_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.max_memory_allocated.md) | +| 13 | [torch.cuda.memory_reserved](https://pytorch.org/docs/stable/generated/torch.cuda.memory_reserved.html#torch.cuda.memory_reserved) | [paddle.device.cuda.memory_reserved](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/memory_reserved_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.memory_reserved.md) | +| 14 | [torch.cuda.memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.memory_allocated.html#torch.cuda.memory_allocated) | [paddle.device.cuda.memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/memory_allocated_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.memory_allocated.md) | +| 15 | [torch.cuda.synchronize](https://pytorch.org/docs/stable/generated/torch.cuda.synchronize.html#torch.cuda.synchronize) | [paddle.device.cuda.synchronize](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/synchronize_cn.html) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.synchronize.md) | +| 16 | [torch.cuda.memory_usage](https://pytorch.org/docs/stable/generated/torch.cuda.memory_usage.html#torch.cuda.memory_usage) | | 功能缺失 | +| 17 | [torch.cuda.mem_get_info](https://pytorch.org/docs/stable/generated/torch.cuda.mem_get_info.html#torch.cuda.mem_get_info) | | 功能缺失 | +| 18 | [torch.cuda.set_rng_state](https://pytorch.org/docs/stable/generated/torch.cuda.set_rng_state.html#torch.cuda.set_rng_state) | | 功能缺失 | +| 19 | [torch.cuda.default_stream](https://pytorch.org/docs/stable/generated/torch.cuda.default_stream.html?highlight=torch+cuda+default_stream#torch.cuda.default_stream) | | 功能缺失 | +| 20 | [torch.cuda.get_arch_list](https://pytorch.org/docs/stable/generated/torch.cuda.get_arch_list.html?highlight=torch+cuda+get_arch_list#torch.cuda.get_arch_list) | | 功能缺失 | +| 21 | [torch.cuda.is_initialized](https://pytorch.org/docs/stable/generated/torch.cuda.is_initialized.html?highlight=torch+cuda+is_initialized#torch.cuda.is_initialized) | | 功能缺失 | +| 22 | [torch.cuda.StreamContext](https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html#torch.cuda.StreamContext) | | 功能缺失 | +| 23 | [torch.cuda.is_current_stream_capturing](https://pytorch.org/docs/stable/generated/torch.cuda.is_current_stream_capturing.html#torch.cuda.is_current_stream_capturing) | | 功能缺失 | +| 24 | [torch.cuda.amp.autocast](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.autocast) | [paddle.amp.auto_cast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/auto_cast_cn.html) | paddle 参数更多, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.amp.autocast.md) | +| 25 | [torch.cuda.amp.GradScaler](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.GradScaler) | [paddle.amp.GradScaler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/GradScaler_cn.html) | 仅参数默认值不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.amp.GradScaler.md) | +| 26 | [torch.cuda.comm.broadcast](https://pytorch.org/docs/stable/generated/torch.cuda.comm.broadcast.html#torch.cuda.comm.broadcast) | [paddle.distributed.broadcast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/broadcast_cn.html) | torch 参数更多, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.comm.broadcast.md) | +| 27 | [torch.cuda.device](https://pytorch.org/docs/stable/generated/torch.cuda.device.html#torch.cuda.device) | [paddle.CUDAPlace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/CUDAPlace_cn.html) | 参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.device.md) | +| 28 | [torch.cuda.DoubleTensor](https://pytorch.org/docs/stable/tensors.html) | [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) | 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.DoubleTensor.md) | +| 29 | [torch.cuda.get_device_name](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_name.html) | [paddle.device.cuda.get_device_properties](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/get_device_properties_cn.html) | 参数不一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_device_name.md) | +| 30 | [torch.cuda.get_rng_state_all](https://pytorch.org/docs/stable/generated/torch.cuda.get_rng_state_all.html#torch.cuda.get_rng_state_all) | [paddle.get_rng_state]() | 参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.get_rng_state_all.md) | +| 31 | [torch.cuda.HalfTensor](https://pytorch.org/docs/stable/tensors.html) | [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) | 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.HalfTensor.md) | +| 32 | [torch.cuda.is_available](https://pytorch.org/docs/stable/generated/torch.cuda.is_available.html#torch-cuda-is-available) | | 组合替代实现 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.is_available.md) | +| 33 | [torch.cuda.manual_seed_all](https://pytorch.org/docs/2.0/generated/torch.cuda.manual_seed_all.html#torch.cuda.manual_seed_all) | [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html) | 参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.manual_seed_all.md) | +| 34 | [torch.cuda.nvtx.range_pop](https://pytorch.org/docs/stable/generated/torch.cuda.nvtx.range_pop.html#torch.cuda.nvtx.range_pop) | [paddle.fluid.core.nvprof_nvtx_pop](https://github.com/PaddlePaddle/Paddle/blob/f00a06d817b97bde23e013c2fb0cd1a6c9c1076b/paddle/fluid/pybind/pybind.cc#L2264) | 无参数, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.nvtx.range_pop.md) | +| 35 | [torch.cuda.nvtx.range_push](https://pytorch.org/docs/stable/generated/torch.cuda.nvtx.range_push.html?highlight=range_push#torch.cuda.nvtx.range_push) | [paddle.fluid.core.nvprof_nvtx_push](https://github.com/PaddlePaddle/Paddle/blob/f00a06d817b97bde23e013c2fb0cd1a6c9c1076b/paddle/fluid/pybind/pybind.cc#L2261) | 仅参数名不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.nvtx.range_push.md) | +| 36 | [torch.cuda.set_rng_state_all](https://pytorch.org/docs/stable/generated/torch.cuda.set_rng_state_all.html#torch.cuda.set_rng_state_all) | [paddle.set_rng_state]() | 参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.set_rng_state_all.md) | +| 37 | [torch.cuda.set_stream](https://pytorch.org/docs/stable/generated/torch.cuda.set_stream.html#torch.cuda.set_stream) | [paddle.device.set_stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/set_stream_cn.html#set-stream) | 参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.set_stream.md) | +| 38 | [torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html) | [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) | 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) | +| 39 | [torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html) | [paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html) | 参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) | +| 40 | [torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream) | [paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html) | 参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) | +| 41 | [torch.cuda.StreamContext](https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html) | | 功能缺失 | +| 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html) | | 功能缺失 | +| 43 | [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed_all.html) | | 功能缺失 | +| 44 | [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html) | | 功能缺失 | +| 45 | [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html) | | 功能缺失 | ***持续更新...*** From 1502c9d1c446b4231a86e11a8189b54faf620d0d Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Sat, 30 Sep 2023 10:19:12 +0800 Subject: [PATCH 02/18] Update pytorch_api_mapping_cn.md --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index 70df36f9755..a9254d262a0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1073,6 +1073,11 @@ | 38 |[torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md)| | 39 |[torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html)|[paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md)| | 40 |[torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream)|[paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md)| +| 41 | [torch.cuda.StreamContext](https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html)| | 功能缺失 | +| 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html)| | 功能缺失 | +| 43 | [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed_all.html)| | 功能缺失 | +| 44 | [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 | +| 45 | [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| | 功能缺失| ***持续更新...*** From 588098ecc226c1fd556a5e0d940ad49b2017bbd4 Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Sat, 30 Sep 2023 18:11:58 +0800 Subject: [PATCH 03/18] Update pytorch_api_mapping_cn.md --- .../model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index a9254d262a0..13d5433f8eb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1073,7 +1073,6 @@ | 38 |[torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md)| | 39 |[torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html)|[paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md)| | 40 |[torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream)|[paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md)| -| 41 | [torch.cuda.StreamContext](https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html)| | 功能缺失 | | 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html)| | 功能缺失 | | 43 | [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed_all.html)| | 功能缺失 | | 44 | [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 | From 72f868c56a033862ff384ef6a383021ad9a7e90d Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Tue, 3 Oct 2023 17:15:56 +0800 Subject: [PATCH 04/18] Update pytorch_api_mapping_cn.md --- .../model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index 13d5433f8eb..ebb0d802b0c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -366,6 +366,7 @@ | 328 | [torch.get_default_dtype](https://pytorch.org/docs/stable/generated/torch.get_default_dtype.html#torch-get-default-dtype) |[paddle.get_default_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/get_default_dtype_cn.html#get-default-dtype)| 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.get_default_dtype.md)| | 329 | [torch.is_grad_enabled](https://pytorch.org/docs/stable/generated/torch.is_grad_enabled.html?highlight=torch+is_grad_enabled#torch.is_grad_enabled) |[paddle.is_grad_enabled](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/is_grad_enabled_cn.html#is-grad-enabled)|无参数, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.is_grad_enabled.md)| | 330 | [torch.manual_seed](https://pytorch.org/docs/stable/generated/torch.manual_seed.html#torch-manual-seed) |[paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/seed_cn.html)| 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md)| +| 331 | [torch.float_power](https://pytorch.org/docs/1.13/generated/torch.float_power.html?highlight=float_power#torch.float_power)| | 功能缺失 | ***持续更新...*** From 3bdc8d5fa6904bb115044d430fc83d5470f4f05f Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Sat, 21 Oct 2023 12:12:29 +0800 Subject: [PATCH 05/18] Update pytorch_api_mapping_cn.md --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index ebb0d802b0c..1a5410d4e5c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -366,7 +366,7 @@ | 328 | [torch.get_default_dtype](https://pytorch.org/docs/stable/generated/torch.get_default_dtype.html#torch-get-default-dtype) |[paddle.get_default_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/get_default_dtype_cn.html#get-default-dtype)| 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.get_default_dtype.md)| | 329 | [torch.is_grad_enabled](https://pytorch.org/docs/stable/generated/torch.is_grad_enabled.html?highlight=torch+is_grad_enabled#torch.is_grad_enabled) |[paddle.is_grad_enabled](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/is_grad_enabled_cn.html#is-grad-enabled)|无参数, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.is_grad_enabled.md)| | 330 | [torch.manual_seed](https://pytorch.org/docs/stable/generated/torch.manual_seed.html#torch-manual-seed) |[paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/seed_cn.html)| 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md)| -| 331 | [torch.float_power](https://pytorch.org/docs/1.13/generated/torch.float_power.html?highlight=float_power#torch.float_power)| | 功能缺失 | +| 331 | [torch.float_power](https://pytorch.org/docs/stable/generated/torch.float_power.html#torch-float-power)| | 组合替代实现 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.copysign.md)| ***持续更新...*** @@ -1074,8 +1074,8 @@ | 38 |[torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md)| | 39 |[torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html)|[paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md)| | 40 |[torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream)|[paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md)| -| 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html)| | 功能缺失 | -| 43 | [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed_all.html)| | 功能缺失 | +| 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html)| | 功能一致,无参数,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed.md)| +| 43 | [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed_all.html)| | 功能一致,无参数,[差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed_all.md)| | 44 | [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 | | 45 | [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| | 功能缺失| From 02a18f8de009751dd04f4560ba2c03600c977327 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Sat, 21 Oct 2023 12:26:06 +0800 Subject: [PATCH 06/18] add torch.cuda.seed.md and torch.cuda.seed_all.md --- .../api_difference/ops/torch.cuda.seed.md | 15 +++++++++++++++ .../api_difference/ops/torch.cuda.seed_all.md | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md new file mode 100644 index 00000000000..fcc8bd1ac3e --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md @@ -0,0 +1,15 @@ +### [ 无参数 ] torch.cuda.seed + +### [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html#torch.cuda.seed) + +```python +torch.cuda.seed() +``` + +### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed) + +```python +paddle.seed() +``` + +两者功能一致,无参数。 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md new file mode 100644 index 00000000000..d8a82965eee --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md @@ -0,0 +1,15 @@ +### [ 无参数 ] torch.cuda.seed + +### [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html#torch.cuda.seed) + +```python +torch.cuda.seed() +``` + +### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed) + +```python +paddle.seed() +``` + +两者功能一致,无参数。 From 859c2534bd4560b0c0304700640a615dcd8eb981 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Sat, 21 Oct 2023 14:48:42 +0800 Subject: [PATCH 07/18] update torch.cuda.float_power.md --- .../api_difference/ops/torch.float_power.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md index 0bd1555a14d..22343f4c47b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md @@ -8,7 +8,7 @@ torch.float_power(input, exponent) 以双倍精度将输入以元素为单位提升到指数的幂级数。如果两个输入都不是复数,则返回 torch.float64 张量; 如果一个或多个输入是复数,则返回 torch.complex128 张量。 -PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API,不过paddle.cast不支持复数类型的转换。 +PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API,不过 paddle.cast 不支持复数类型的转换。 ### 转写示例 From 5d5111f710e582dabefc92ddf0b5bd8c791c24ab Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Thu, 9 Nov 2023 22:57:36 +0800 Subject: [PATCH 08/18] fix bug --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index a44133481c8..2eb1a6e64f5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -368,7 +368,7 @@ | REFERENCE-MAPPING-ITEM(`torch.is_grad_enabled`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.is_grad_enabled.md) | | REFERENCE-MAPPING-ITEM(`torch.manual_seed`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md) | | [torch.can_cast](https://pytorch.org/docs/stable/generated/torch.can_cast.html#torch-can-cast) | 功能缺失 | - +| REFERENCE-MAPPING-ITEM(`torch.float_power`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md) | ***持续更新...*** @@ -1389,6 +1389,10 @@ | REFERENCE-MAPPING-ITEM(`torch.cuda.ShortTensor`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.Stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) | +| REFERENCE-MAPPING-ITEM(`torch.cuda.seed`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed.md) | +| REFERENCE-MAPPING-ITEM(`torch.cuda.seed_all`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed_all.md) | +| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 | +| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| | 功能缺失| ***持续更新...*** From a6369bb6158616d606ccaa9f1855a6ef43e090d1 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Mon, 13 Nov 2023 21:48:31 +0800 Subject: [PATCH 09/18] fix bug --- .../api_difference/ops/torch.cuda.seed.md | 9 +++++++-- .../api_difference/ops/torch.cuda.seed_all.md | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md index fcc8bd1ac3e..e5f01fcf797 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md @@ -9,7 +9,12 @@ torch.cuda.seed() ### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed) ```python -paddle.seed() +paddle.seed(1024) ``` -两者功能一致,无参数。 +Paddle 相比 Pytorch 参数更多 + +### 参数映射 +| PyTorch | Paddle | 备注 | +| ------- |--------| --------------------------------------------------------- | +| - | seed | seed (int) - 要设置的的随机种子,推荐使用较大的整数 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md index d8a82965eee..1399f1077cf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md @@ -9,7 +9,12 @@ torch.cuda.seed() ### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed) ```python -paddle.seed() +paddle.seed(1024) ``` -两者功能一致,无参数。 +Paddle 相比 Pytorch 参数更多 + +### 参数映射 +| PyTorch | Paddle | 备注 | +| ------- |--------| --------------------------------------------------------- | +| - | seed | seed (int) - 要设置的的随机种子,推荐使用较大的整数 | From d2f1de4fbcb96ab79959cdfa4caa19d839eb5ef5 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Wed, 22 Nov 2023 00:01:45 +0800 Subject: [PATCH 10/18] fix bug --- .../api_difference/ops/torch.float_power.md | 23 ------------------- .../pytorch_api_mapping_cn.md | 1 - 2 files changed, 24 deletions(-) delete mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md deleted file mode 100644 index 22343f4c47b..00000000000 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md +++ /dev/null @@ -1,23 +0,0 @@ -## [ 组合替代实现 ]torch.float_power - -### [torch.float_power](https://pytorch.org/docs/stable/generated/torch.float_power.html#torch-float-power) -```python -torch.float_power(input, exponent) -``` - -以双倍精度将输入以元素为单位提升到指数的幂级数。如果两个输入都不是复数,则返回 torch.float64 张量; -如果一个或多个输入是复数,则返回 torch.complex128 张量。 - -PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API,不过 paddle.cast 不支持复数类型的转换。 - -### 转写示例 - -```python -# Pytorch 写法 -import paddle - -y = torch.float_power(input, exponent) - -# Paddle 写法 -y = paddle.cast(paddle.pow(input, exponent), 'float64') -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index 2eb1a6e64f5..0bf97679d87 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -368,7 +368,6 @@ | REFERENCE-MAPPING-ITEM(`torch.is_grad_enabled`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.is_grad_enabled.md) | | REFERENCE-MAPPING-ITEM(`torch.manual_seed`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md) | | [torch.can_cast](https://pytorch.org/docs/stable/generated/torch.can_cast.html#torch-can-cast) | 功能缺失 | -| REFERENCE-MAPPING-ITEM(`torch.float_power`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.float_power.md) | ***持续更新...*** From f7ace43711ac8949f6652c8c8b0e641c49b8a6c9 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Sat, 9 Dec 2023 15:07:07 +0800 Subject: [PATCH 11/18] fix bug --- .../ops/torch.cuda.get_device_name.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md new file mode 100644 index 00000000000..022a1fc592b --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md @@ -0,0 +1,20 @@ +### [ 无参数 ] torch.cuda.seed + +### [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_name.html#torch-cuda-get-device-name) + +```python +torch.cuda.get_device_name() +``` + +### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/get_device_name_cn.html#get-device-name) + +```python +paddle.device.cuda.get_device_name() +``` + +Paddle 相比 Pytorch 参数更多 + +### 参数映射 +| PyTorch | Paddle | 备注 | +|---------|--------| -------------------------------------------------------- | +| device | device | 希望获取名称的设备或者设备 ID。如果 device 为 None(默认),则为当前的设备 | From 0c4bd06ac7e299ac52b561b82b47445c7f02ce9b Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Sat, 9 Dec 2023 15:11:43 +0800 Subject: [PATCH 12/18] fix bug --- .../ops/torch.cuda.get_device_name.md | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md deleted file mode 100644 index 022a1fc592b..00000000000 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.get_device_name.md +++ /dev/null @@ -1,20 +0,0 @@ -### [ 无参数 ] torch.cuda.seed - -### [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_name.html#torch-cuda-get-device-name) - -```python -torch.cuda.get_device_name() -``` - -### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/get_device_name_cn.html#get-device-name) - -```python -paddle.device.cuda.get_device_name() -``` - -Paddle 相比 Pytorch 参数更多 - -### 参数映射 -| PyTorch | Paddle | 备注 | -|---------|--------| -------------------------------------------------------- | -| device | device | 希望获取名称的设备或者设备 ID。如果 device 为 None(默认),则为当前的设备 | From 98f2a72b62fe78ab5b167e7499bcd5d65a01594f Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Fri, 19 Jan 2024 14:04:29 +0800 Subject: [PATCH 13/18] Delete docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md --- .../api_difference/ops/torch.cuda.seed.md | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md deleted file mode 100644 index e5f01fcf797..00000000000 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed.md +++ /dev/null @@ -1,20 +0,0 @@ -### [ 无参数 ] torch.cuda.seed - -### [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html#torch.cuda.seed) - -```python -torch.cuda.seed() -``` - -### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed) - -```python -paddle.seed(1024) -``` - -Paddle 相比 Pytorch 参数更多 - -### 参数映射 -| PyTorch | Paddle | 备注 | -| ------- |--------| --------------------------------------------------------- | -| - | seed | seed (int) - 要设置的的随机种子,推荐使用较大的整数 | From 84b5b7a97aa23b2d11a36402350b2b0b4cab3fdf Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Fri, 19 Jan 2024 14:04:47 +0800 Subject: [PATCH 14/18] Delete docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md --- .../api_difference/ops/torch.cuda.seed_all.md | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md deleted file mode 100644 index 1399f1077cf..00000000000 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.cuda.seed_all.md +++ /dev/null @@ -1,20 +0,0 @@ -### [ 无参数 ] torch.cuda.seed - -### [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html#torch.cuda.seed) - -```python -torch.cuda.seed() -``` - -### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed) - -```python -paddle.seed(1024) -``` - -Paddle 相比 Pytorch 参数更多 - -### 参数映射 -| PyTorch | Paddle | 备注 | -| ------- |--------| --------------------------------------------------------- | -| - | seed | seed (int) - 要设置的的随机种子,推荐使用较大的整数 | From 641a8d1f0ab1e1d85f0dc60ca0a98171d43c19aa Mon Sep 17 00:00:00 2001 From: LoneRanger <836253168@qq.com> Date: Fri, 19 Jan 2024 21:47:20 +0800 Subject: [PATCH 15/18] Update pytorch_api_mapping_cn.md --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index ee0cdf8e337..13cafaeb0bb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1388,8 +1388,6 @@ | REFERENCE-MAPPING-ITEM(`torch.cuda.ShortTensor`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.Stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) | -| REFERENCE-MAPPING-ITEM(`torch.cuda.seed`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed.md) | -| REFERENCE-MAPPING-ITEM(`torch.cuda.seed_all`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed_all.md) | | [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 | | [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| | 功能缺失| From a1da7da801906f6ec73e532eb7256b64ed835247 Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Mon, 22 Jan 2024 21:44:37 +0800 Subject: [PATCH 16/18] fix bug --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index 13cafaeb0bb..b0b88094ad6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1388,8 +1388,8 @@ | REFERENCE-MAPPING-ITEM(`torch.cuda.ShortTensor`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.Stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) | -| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 | -| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| | 功能缺失| +| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| 功能缺失 | +| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| 功能缺失| ***持续更新...*** From 687b3ab7c918275b2bb2f56282db99507f93271e Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Mon, 22 Jan 2024 22:20:03 +0800 Subject: [PATCH 17/18] fix bug --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index b0b88094ad6..8b1d406fbc7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1388,8 +1388,8 @@ | REFERENCE-MAPPING-ITEM(`torch.cuda.ShortTensor`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.Stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) | -| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| 功能缺失 | -| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| 功能缺失| +| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html) | 功能缺失 | +| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html) | 功能缺失 | ***持续更新...*** From 4532a7b40934b2a0c6f233df2e9c790f3b4ddc3c Mon Sep 17 00:00:00 2001 From: longranger2 <836253168@qq.com> Date: Wed, 24 Jan 2024 14:41:46 +0800 Subject: [PATCH 18/18] fix bug --- .../convert_from_pytorch/pytorch_api_mapping_cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md index 7aabe69489c..4d4a35506d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md @@ -1095,8 +1095,8 @@ | REFERENCE-MAPPING-ITEM(`torch.cuda.ShortTensor`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) | | REFERENCE-MAPPING-ITEM(`torch.cuda.Stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) | -| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html) | 功能缺失 | -| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html) | 功能缺失 | +| NOT-IMPLEMENTED-ITEM(`torch.cuda.comm.scatter`, https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatter.html#torch-cuda-comm-scatter) | +| NOT-IMPLEMENTED-ITEM(`torch.cuda.comm.gather`, https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html#torch-cuda-comm-gather) | ***持续更新...***