Skip to content

Fix huge MIOpen workspace allocations#413

Merged
pxl-th merged 1 commit intomasterfrom
pxl-th/miopen-workspace
Apr 19, 2023
Merged

Fix huge MIOpen workspace allocations#413
pxl-th merged 1 commit intomasterfrom
pxl-th/miopen-workspace

Conversation

@pxl-th
Copy link
Copy Markdown
Member

@pxl-th pxl-th commented Apr 19, 2023

  • Use workspace size suggested from find_conv_algo function.
    Using get_workspace_size function for initial workspace allocation can lead to unncessary huge memory allocations (up to 2.5 GiB). Here's an example of convolution that led to 2.5 GiB workspace allocation.
c = Conv((3, 3), 1280=>1280) |> f16 |> gpu
x = rand(Float32, 32, 32, 1280, 1) |> f16 |> gpu
y = c(x)

Workspace size from find_conv_algo takes only ~15 MiB.

  • Refactor allocation code a bit

- Refactor allocation code a bit
@pxl-th pxl-th merged commit 36bfc53 into master Apr 19, 2023
@pxl-th pxl-th deleted the pxl-th/miopen-workspace branch April 19, 2023 09:26
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