Skip to content

Commit

Permalink
Update defaults to IN_WG=128,IN_SIZEX=16,OUT_WG=128,OUT_SIZEX=16
Browse files Browse the repository at this point in the history
  • Loading branch information
preda committed Dec 9, 2024
1 parent 393da1c commit 7a0ba6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/cl/base.cl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

/* Tunable paramaters for -ctune :
IN_WG, OUT_WG: 64, 128, 256. Default: 256.
IN_SIZEX, OUT_SIZEX: 4, 8, 16, 32. Default: 32 on AMD, 4 on Nvidia.
IN_WG, OUT_WG: 64, 128, 256. Default: 128.
IN_SIZEX, OUT_SIZEX: 4, 8, 16, 32. Default: 16.
UNROLL_W: 0, 1. Default: 0 on AMD, 1 on Nvidia.
UNROLL_H: 0, 1. Default: 1.
*/
Expand Down
26 changes: 4 additions & 22 deletions src/cl/middle.cl
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
// Copyright (C) Mihai Preda and George Woltman

#if !IN_WG
#define IN_WG 256
#define IN_WG 128
#endif

#if !OUT_WG
#define OUT_WG 256
#define OUT_WG 128
#endif

#if !IN_SIZEX
#if AMDGPU
#define IN_SIZEX 32
#else // !AMDGPU
#if G_W >= 64
#define IN_SIZEX 4
#else
#define IN_SIZEX 32
#endif
#endif
#define IN_SIZEX 16
#endif

#if !OUT_SIZEX
#if AMDGPU
// We realized that these (OUT_WG, OUT_SIZEX) combinations work well: (256, 32) and (64, 8)
// so default OUT_SIZEX relative to OUT_WG
#define OUT_SIZEX (OUT_WG / 8)
#else
#if G_W >= 64
#define OUT_SIZEX 4
#else
#define OUT_SIZEX 32
#endif
#endif
#define OUT_SIZEX 16
#endif

// Parameters we may want to let user tune. WIDTH other than 512 and 1K is untested. SMALL_HEIGHT other than 256 and 512 is untested.
Expand Down

0 comments on commit 7a0ba6d

Please sign in to comment.