"router/vscode:/vscode.git/clone" did not exist on "954653466d24a9b3435988136983398bdf788a2f"
Unverified Commit adeee152 authored by Yineng Zhang's avatar Yineng Zhang Committed by GitHub
Browse files

fix sgl-kernel build failure on AMD (#3352)

parent 6792411e
...@@ -16,7 +16,9 @@ limitations under the License. ...@@ -16,7 +16,9 @@ limitations under the License.
#pragma once #pragma once
#include <cuda_runtime.h> #include <cuda_runtime.h>
#ifndef USE_ROCM
#include <pytorch_extension_utils.h> #include <pytorch_extension_utils.h>
#endif
#include <torch/extension.h> #include <torch/extension.h>
#include <sstream> #include <sstream>
...@@ -63,6 +65,7 @@ inline int getSMVersion() { ...@@ -63,6 +65,7 @@ inline int getSMVersion() {
return sm_major * 10 + sm_minor; return sm_major * 10 + sm_minor;
} }
#ifndef USE_ROCM
#define DISPATCH_PYTORCH_DTYPE_TO_CTYPE_FLOAT_FP16(pytorch_dtype, c_type, ...) \ #define DISPATCH_PYTORCH_DTYPE_TO_CTYPE_FLOAT_FP16(pytorch_dtype, c_type, ...) \
[&]() -> bool { \ [&]() -> bool { \
switch (pytorch_dtype) { \ switch (pytorch_dtype) { \
...@@ -79,6 +82,7 @@ inline int getSMVersion() { ...@@ -79,6 +82,7 @@ inline int getSMVersion() {
return false; \ return false; \
} \ } \
}() }()
#endif
#define DISPATCH_CASE_INTEGRAL_TYPES(...) \ #define DISPATCH_CASE_INTEGRAL_TYPES(...) \
AT_DISPATCH_CASE(at::ScalarType::Byte, __VA_ARGS__) \ AT_DISPATCH_CASE(at::ScalarType::Byte, __VA_ARGS__) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment