@@ -3128,6 +3128,10 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
31283128 if (!OMPX_UseMultipleSdmaEngines.isPresent ()) {
31293129 OMPX_UseMultipleSdmaEngines = EnvarConfig.OMPX_UseMultipleSdmaEngines ;
31303130 }
3131+ if (!OMPX_AdjustNumTeamsForXteamRedSmallBlockSize.isPresent ()) {
3132+ OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =
3133+ EnvarConfig.OMPX_AdjustNumTeamsForXteamRedSmallBlockSize ;
3134+ }
31313135 }
31323136
31333137 ~AMDGPUDeviceTy () {}
@@ -5043,14 +5047,27 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
50435047 struct DeviceEnvarConfigTy {
50445048 bool
50455049 OMPX_UseMultipleSdmaEngines; // LIBOMPTARGET_AMDGPU_USE_MULTIPLE_SDMA_ENGINES
5050+ bool
5051+ OMPX_AdjustNumTeamsForXteamRedSmallBlockSize;
50465052 };
50475053
50485054 static inline const std::unordered_map<std::string, DeviceEnvarConfigTy>
5049- EnvarConfigs = {{" MI210" , {.OMPX_UseMultipleSdmaEngines = true }},
5050- {" MI300A" , {.OMPX_UseMultipleSdmaEngines = false }},
5051- {" MI300X" , {.OMPX_UseMultipleSdmaEngines = true }},
5055+ EnvarConfigs = {{" MI210" , {.OMPX_UseMultipleSdmaEngines = true ,
5056+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =0 }},
5057+ {" MI250X" ,{.OMPX_UseMultipleSdmaEngines = true ,
5058+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =0 }},
5059+ {" MI250X/MI250" ,{
5060+ .OMPX_UseMultipleSdmaEngines = true ,
5061+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =0 }},
5062+ {" MI300A" , {.OMPX_UseMultipleSdmaEngines = false ,
5063+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =1 }},
5064+ {" MI300X" , {.OMPX_UseMultipleSdmaEngines = true ,
5065+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =1 }},
5066+ {" MI355X" , {.OMPX_UseMultipleSdmaEngines = true ,
5067+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =1 }},
50525068 // Default config for unknown devices.
5053- {" DEFAULT" , {.OMPX_UseMultipleSdmaEngines = true }}};
5069+ {" DEFAULT" , {.OMPX_UseMultipleSdmaEngines = true ,
5070+ .OMPX_AdjustNumTeamsForXteamRedSmallBlockSize =1 }}};
50545071
50555072 const DeviceEnvarConfigTy &getEnvarConfig () const {
50565073 std::string DeviceMarketingName = getNormMarketingName ();
0 commit comments