mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Suppress -Wunused-function
for DSA (#150735)
Test Plan: Sandcastle Reviewed By: dtolnay Differential Revision: D72458590 Pull Request resolved: https://github.com/pytorch/pytorch/pull/150735 Approved by: https://github.com/eqy, https://github.com/cyyever
This commit is contained in:
committed by
PyTorch MergeBot
parent
370ba6b96f
commit
d8d306cbc6
@ -6,6 +6,7 @@
|
||||
namespace c10::cuda {
|
||||
|
||||
#ifdef TORCH_USE_CUDA_DSA
|
||||
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wunused-function")
|
||||
// Copy string from `src` to `dst`
|
||||
static __device__ void dstrcpy(char* dst, const char* src) {
|
||||
int i = 0;
|
||||
@ -64,6 +65,7 @@ static __device__ void dsa_add_new_assertion_failure(
|
||||
self.thread_id[1] = thread_id.y;
|
||||
self.thread_id[2] = thread_id.z;
|
||||
}
|
||||
C10_CLANG_DIAGNOSTIC_POP()
|
||||
|
||||
// Emulates a kernel assertion. The assertion won't stop the kernel's progress,
|
||||
// so you should assume everything the kernel produces is garbage if there's an
|
||||
|
Reference in New Issue
Block a user