Fix some sign conversion warnings (#1172)
* Fix sign conversion warnings * Fix type conversion warnings * Fix sign conversion warnings * Change smem_size_ to constexpr * clang warnings * undo cast change * one miss change * missing part --------- Co-authored-by: Haicheng Wu <haichengw@nvidia.com>
This commit is contained in:
@@ -112,7 +112,8 @@ protected:
|
||||
CUTLASS_THREAD_LOCAL static int sm_occupancy_;
|
||||
|
||||
/// Kernel dynamic shared memory allocation requirement
|
||||
CUTLASS_THREAD_LOCAL static int smem_size_;
|
||||
/// Update the kernel function's shared memory configuration for the current device
|
||||
static constexpr size_t smem_size_ = sizeof(typename GemmKernel::SharedStorage);
|
||||
|
||||
/// Initialize static thread-local members for the thread's current device,
|
||||
/// if necessary.
|
||||
@@ -143,11 +144,8 @@ protected:
|
||||
return Status::kErrorInternal;
|
||||
}
|
||||
|
||||
// Update the kernel function's shared memory configuration for the current device
|
||||
smem_size_ = int(sizeof(typename GemmKernel::SharedStorage));
|
||||
|
||||
// If requires more than 48KB: configure for extended, dynamic shared memory
|
||||
if (smem_size_ >= (48 << 10))
|
||||
if constexpr (smem_size_ >= (48 << 10))
|
||||
{
|
||||
cudart_result = cudaFuncSetAttribute(
|
||||
Kernel2<GemmKernel>,
|
||||
@@ -377,7 +375,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Static initializers
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -394,12 +391,6 @@ CUTLASS_THREAD_LOCAL int GemmUniversalBase<GemmKernel_>::device_sms_ = -1;
|
||||
template <typename GemmKernel_>
|
||||
CUTLASS_THREAD_LOCAL int GemmUniversalBase<GemmKernel_>::sm_occupancy_ = -1;
|
||||
|
||||
/// Kernel dynamic shared memory allocation requirement
|
||||
template <typename GemmKernel_>
|
||||
CUTLASS_THREAD_LOCAL int GemmUniversalBase<GemmKernel_>::smem_size_ = -1;
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
} // namespace device
|
||||
|
||||
Reference in New Issue
Block a user