Skip to content

Using optimize_device_cache instead of optimize_cuda_cache doesn't work #1689

Description

@alexisrozhkov

optimize_cuda_cache in PPOConfig is marked as deprecated, and optimize_device_cache is recommended instead.

However, when I use optimize_device_cache instead of optimize_cuda_cache, time/ppo/optimize_step in my runs increases from ~42 to ~230 seconds.

It seems like currently when optimize_cuda_cache is not set it overrides whatever value was assigned to optimize_device_cache with False:

if optimize_cuda_cache is not None:
warnings.warn(
"The `optimize_cuda_cache` argument will be deprecated soon, please use `optimize_device_cache` instead."
)
optimize_device_cache = optimize_cuda_cache
else:
optimize_device_cache = False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions