ROCm / ROCm/AMDMIGraphX

Fuse Average Pooling with Convolution

Open
#2,867 1 comment 0 reactions 1 assignee View on GitHub

@TedThemistokleous is already working on this.

Since Mar 7, 2024.

Perf Improve
Dominant language
C++
Stars
333
Forks
150
Avg merge
4d 19h
Merged PRs (30d)
54

Description

Fuse average pooling with convolution

@77 = gpu::code_object[code_object=9344,symbol_name=pad_kernel,global=262848,local=1024,](@57,@76) -> float_type, {1, 192, 37, 37}, {262848, 1369, 37, 1}
@78 = load[offset=705600,end=1646400](@1) -> float_type, {1, 192, 35, 35}, {235200, 1225, 35, 1}
@79 = gpu::pooling[mode=average,padding={0, 0, 0, 0},padding_mode=0,stride={1, 1},lengths={3, 3},dilations={1, 1},ceil_mode=0,lp_order=2,dyn_global=0](@77,@78) -> float_type, {1, 192, 35, 35}, {235200, 1225, 35, 1}
@80 = hip::hip_copy_literal[id=main:@literal:147] -> float_type, {32}, {1}
@81 = hip::hip_copy_literal[id=main:@literal:148] -> float_type, {32, 192, 1, 1}, {192, 1, 1, 1}
@82 = load[offset=1960000,end=2116800](@1) -> float_type, {1, 32, 35, 35}, {39200, 1225, 35, 1}
@83 = broadcast[axis=1,out_lens={1, 32, 35, 35}](@80) -> float_type, {1, 32, 35, 35}, {0, 1, 0, 0}
@84 = gpu::code_object[code_object=7312,symbol_name=mlir_convolution_add_relu,global=9856,local=64,](@83,@79,@81,@82) -> float_type, {1, 32, 35, 35}, {39200, 1225, 35, 1}

We could convert the average pooling to a convolution(and get rid of the pad_kernel). Then we will have a convolution into another convolution. Convolution is not commutative like gemms, but I believe we could rewrite it as a backwards convolution where we apply convolution to the weights.

Related to inceptionV3 and other models

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.