rocr: Quiet some ROCr compile warnings

These are mostly AIE related, but there are a couple of others.

Change-Id: I549e004772160ca282d4c94dc9d94dd2ccae8b1c


[ROCm/ROCR-Runtime commit: 08699069d6]
This commit is contained in:
Chris Freehill
2024-10-23 14:07:00 -05:00
committed by Chris Freehill
parent 6617af10e6
commit dd037425ed
13 changed files with 50 additions and 25 deletions
@@ -95,13 +95,13 @@ public:
// AIE agent methods.
/// @brief Get the number of columns on this AIE agent.
int GetNumCols() const { return num_cols_; }
void SetNumCols(int num_cols) { num_cols_ = num_cols; }
uint32_t GetNumCols() const { return num_cols_; }
void SetNumCols(uint32_t num_cols) { num_cols_ = num_cols; }
/// @brief Get the number of core tile rows on this AIE agent.
int GetNumCoreRows() const { return num_core_rows_; }
void SetNumCoreRows(int num_core_rows) { num_core_rows_ = num_core_rows; }
uint32_t GetNumCoreRows() const { return num_core_rows_; }
void SetNumCoreRows(uint32_t num_core_rows) { num_core_rows_ = num_core_rows; }
/// @brief Get the number of core tiles on this AIE agent.
int GetNumCores() const { return num_cols_ * num_core_rows_; }
uint32_t GetNumCores() const { return num_cols_ * num_core_rows_; }
private:
/// @brief Query the driver to get the region list owned by this agent.
@@ -123,10 +123,10 @@ private:
const uint32_t max_queues_ = 1;
/// @brief Number of columns in the AIE array.
int num_cols_ = 0;
uint32_t num_cols_ = 0;
/// @brief Number of rows of core tiles in the AIE array. Not all rows in a
/// column are cores. Some can be memory or shim tiles.
int num_core_rows_ = 0;
uint32_t num_core_rows_ = 0;
};
} // namespace AMD
@@ -116,7 +116,7 @@ public:
hsa_fence_scope_t releaseFence = HSA_FENCE_SCOPE_NONE,
hsa_signal_t *signal = NULL) override;
uint32_t queue_id_ = INVALID_QUEUEID;
HSA_QUEUEID queue_id_ = INVALID_QUEUEID;
/// @brief ID of AIE device on which this queue has been mapped.
uint32_t node_id_ = std::numeric_limits<uint32_t>::max();
/// @brief Queue size in bytes.
@@ -346,8 +346,6 @@ class AqlQueue : public core::Queue, private core::LocalSignal, public core::Doo
static KernelMutex queue_lock_;
return queue_lock_;
}
// Async scratch single limit - may be modified after init
size_t async_scratch_single_limit_;
static __forceinline int& rtti_id() {
static int rtti_id_ = 0;
@@ -507,14 +507,14 @@ class GpuAgent : public GpuAgentInt {
hsa_status_t EnableDmaProfiling(bool enable) override;
hsa_status_t PcSamplingIterateConfig(hsa_ven_amd_pcs_iterate_configuration_callback_t cb,
void* cb_data);
hsa_status_t PcSamplingCreate(pcs::PcsRuntime::PcSamplingSession& session);
void* cb_data) override;
hsa_status_t PcSamplingCreate(pcs::PcsRuntime::PcSamplingSession& session) override;
hsa_status_t PcSamplingCreateFromId(HsaPcSamplingTraceId pcsId,
pcs::PcsRuntime::PcSamplingSession& session);
hsa_status_t PcSamplingDestroy(pcs::PcsRuntime::PcSamplingSession& session);
hsa_status_t PcSamplingStart(pcs::PcsRuntime::PcSamplingSession& session);
hsa_status_t PcSamplingStop(pcs::PcsRuntime::PcSamplingSession& session);
hsa_status_t PcSamplingFlush(pcs::PcsRuntime::PcSamplingSession& session);
pcs::PcsRuntime::PcSamplingSession& session) override;
hsa_status_t PcSamplingDestroy(pcs::PcsRuntime::PcSamplingSession& session) override;
hsa_status_t PcSamplingStart(pcs::PcsRuntime::PcSamplingSession& session) override;
hsa_status_t PcSamplingStop(pcs::PcsRuntime::PcSamplingSession& session) override;
hsa_status_t PcSamplingFlush(pcs::PcsRuntime::PcSamplingSession& session) override;
hsa_status_t PcSamplingFlushHostTrapDeviceBuffers(pcs::PcsRuntime::PcSamplingSession& session);
static void PcSamplingThreadRun(void* agent);
@@ -4,7 +4,8 @@
#include "inc/hsa_amd_tool.h"
#include "runtime.h"
namespace rocr::AMD::tool {
// namespace rocr::AMD::tool { // C++17
namespace rocr { namespace AMD { namespace tool {
using scratch_alloc_flag = hsa_amd_event_scratch_alloc_flag_t;
@@ -135,7 +136,9 @@ __forceinline void notify_event_scratch_async_reclaim_end(const hsa_queue_t* que
hsa_amd_tool_event_t{.scratch_async_reclaim_end = &event});
}
} // namespace rocr::AMD::tool
// } // namespace rocr::AMD::tool
} // namespace rocr
} // namespace AMD
} // namespace tool
#endif
@@ -559,7 +559,7 @@ BlitSdma<RingIndexTy, HwIndexMonotonic, SizeToCountOffset, useGCR>::SubmitCopyRe
const bool isGFX12Plus = (agent_->isa()->GetMajorVersion() >= 12);
// Common and GFX12 packet must match in size to use same code for vector/append.
static_assert(sizeof(SDMA_PKT_COPY_LINEAR_RECT) == sizeof(SDMA_PKT_COPY_LINEAR_RECT_GFX12));
static_assert(sizeof(SDMA_PKT_COPY_LINEAR_RECT) == sizeof(SDMA_PKT_COPY_LINEAR_RECT_GFX12), "");
const uint max_pitch = 1 << (isGFX12Plus ? SDMA_PKT_COPY_LINEAR_RECT_GFX12::pitch_bits : SDMA_PKT_COPY_LINEAR_RECT::pitch_bits);