rocr:Fix compile warnings
This commit is contained in:
committed by
Yat Sin, David
parent
0d70045817
commit
11da1293de
@@ -1101,7 +1101,7 @@ void VirtMemoryTestBasic::NonContiguousChunks(hsa_agent_t cpuAgent, hsa_agent_t
|
||||
ASSERT_SUCCESS(hsa_amd_vmem_set_access(addr, NUM_BUFFERS * alloc_size, permsAccess,
|
||||
ARRAY_SIZE(permsAccess)));
|
||||
|
||||
for (int i = 0; i < NUM_BUFFERS; i++) {
|
||||
for (unsigned i = 0; i < NUM_BUFFERS; i++) {
|
||||
// TODO Map them in opposite order
|
||||
ASSERT_SUCCESS(hsa_amd_vmem_unmap(addr_chunks[i], alloc_size));
|
||||
}
|
||||
|
||||
@@ -447,6 +447,7 @@ class GpuAgent : public GpuAgentInt {
|
||||
*((uint8_t*)ptr + size - 1) = *((uint8_t*)ptr + size - 1);
|
||||
_mm_mfence();
|
||||
auto readback = *(reinterpret_cast<volatile uint8_t*>(ptr) + size - 1);
|
||||
UNUSED(readback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -845,9 +846,9 @@ class GpuAgent : public GpuAgentInt {
|
||||
pcs_data_t pcs_stochastic_data_;
|
||||
|
||||
/// @brief XGMI CPU<->GPU
|
||||
bool xgmi_cpu_gpu_ = false;
|
||||
bool xgmi_cpu_gpu_;
|
||||
/// @brief Is PCIe large BAR enabled.
|
||||
bool large_bar_enabled_ = false;
|
||||
bool large_bar_enabled_;
|
||||
};
|
||||
|
||||
} // namespace amd
|
||||
|
||||
@@ -115,10 +115,11 @@ GpuAgent::GpuAgent(HSAuint32 node, const HsaNodeProperties& node_props, bool xna
|
||||
scratch_cache_(
|
||||
[this](void* base, size_t size, bool large) { ReleaseScratch(base, size, large); }),
|
||||
trap_handler_tma_region_(NULL),
|
||||
rec_sdma_eng_override_(false),
|
||||
pcs_hosttrap_data_(),
|
||||
pcs_stochastic_data_(),
|
||||
xgmi_cpu_gpu_(false),
|
||||
rec_sdma_eng_override_(false) {
|
||||
large_bar_enabled_(false){
|
||||
const bool is_apu_node = (properties_.NumCPUCores > 0);
|
||||
profile_ = (is_apu_node) ? HSA_PROFILE_FULL : HSA_PROFILE_BASE;
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ bool BuildTopology() {
|
||||
// Using one pcie sdma for device to device copy with limited XGMI SDMA engine.
|
||||
// This will help improve all to all copy with limited XGMI SDMA engine.
|
||||
if (rec_sdma_engine_override) {
|
||||
uint32_t sdma_engine_mask = (1 << ((AMD::GpuAgent*)src_gpu)->properties().NumSdmaEngines - 1);
|
||||
uint32_t sdma_engine_mask = (1 << (((AMD::GpuAgent*)src_gpu)->properties().NumSdmaEngines - 1));
|
||||
rec_sdma_eng_id_mask = !IsPowerOfTwo(rec_sdma_eng_id_mask) ?
|
||||
sdma_engine_mask : rec_sdma_eng_id_mask;
|
||||
}
|
||||
|
||||
@@ -151,6 +151,8 @@ static __forceinline unsigned long long int strtoull(const char* str,
|
||||
rocr::log_printf(__FILENAME__, __LINE__, format, ##__VA_ARGS__); \
|
||||
} while (false);
|
||||
|
||||
// A macro to remove unused variable warnings
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
// A macro to disallow the copy and move constructor and operator= functions
|
||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
|
||||
Reference in New Issue
Block a user