SWDEV-373173 - Add kernel metadata for WGP mode

Change-Id: Ic270e90c46938b975513ff2bc19b7bb6b9485f9d


[ROCm/clr commit: 0bd0c29b7d]
このコミットが含まれているのは:
Anusha GodavarthySurya
2023-01-02 12:28:22 +00:00
committed by Anusha Godavarthy Surya
コミット 5b79a926e3
2個のファイルの変更、13行の追加、3行の削除
+10 -3
ファイルの表示
@@ -241,7 +241,8 @@ enum class KernelField : uint8_t {
MaxFlatWorkGroupSize = 12,
NumSpilledSGPRs = 13,
NumSpilledVGPRs = 14,
Kind = 15
Kind = 15,
WgpMode = 16
};
static const std::map<std::string,ArgField> ArgFieldMapV3 =
@@ -327,7 +328,8 @@ static const std::map<std::string,KernelField> KernelFieldMapV3 =
{".max_flat_workgroup_size", KernelField::MaxFlatWorkGroupSize},
{".sgpr_spill_count", KernelField::NumSpilledSGPRs},
{".vgpr_spill_count", KernelField::NumSpilledVGPRs},
{".kind", KernelField::Kind}
{".kind", KernelField::Kind},
{".workgroup_processor_mode", KernelField::WgpMode}
};
#endif // defined(USE_COMGR_LIBRARY)
@@ -385,7 +387,8 @@ class Kernel : public amd::HeapObject {
bool uniformWorkGroupSize_; //!< uniform work group size option
size_t wavesPerSimdHint_; //!< waves per simd hit
int maxOccupancyPerCu_; //!< Max occupancy per compute unit in threads
size_t constMemSize_; //!< size of user-allocated constant memory
size_t constMemSize_; //!< size of user-allocated constant memory
bool isWGPMode_; //!< kernel compiled in WGP/cumode
};
//! Default constructor
@@ -513,6 +516,10 @@ class Kernel : public amd::HeapObject {
kind_ = (kind == "init") ? Init : ((kind == "fini") ? Fini : Normal);
}
void SetWGPMode(bool wgpMode) {
workGroupInfo_.isWGPMode_ = wgpMode;
}
bool isInitKernel() const { return kind_ == Init; }
bool isFiniKernel() const { return kind_ == Fini; }