Prompt48 commited on
Commit
47e1719
·
verified ·
1 Parent(s): ffd966f

Upload edit\Qwen3-TTS-test\.venv\Lib\site-packages\torch\include\ATen\native\cuda\ForeachMinMaxFunctors.cuh with huggingface_hub

Browse files
edit//Qwen3-TTS-test//.venv//Lib//site-packages//torch//include//ATen//native//cuda//ForeachMinMaxFunctors.cuh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #include <ATen/NumericUtils.h>
4
+
5
+ namespace at::native {
6
+
7
+ // std:: does not have clamp functors
8
+ template <typename T>
9
+ struct minimum {
10
+ __device__ T operator()(const T& a, const T& b) const {
11
+ return (_isnan(a) || a < b) ? a : b;
12
+ }
13
+ };
14
+
15
+ template <typename T>
16
+ struct maximum {
17
+ __device__ T operator()(const T& a, const T& b) const {
18
+ return (_isnan(a) || a > b) ? a : b;
19
+ }
20
+ };
21
+
22
+ } // namespace at::native