Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
0b57ce18
Unverified
Commit
0b57ce18
authored
Mar 25, 2021
by
Quan (Andy) Gan
Committed by
GitHub
Mar 25, 2021
Browse files
[Bug] Disable cpu fp16 (#2783)
* disable cpu fp16 * spell mistakes
parent
03482f0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
src/array/cpu/sddmm.cc
src/array/cpu/sddmm.cc
+1
-1
src/array/cpu/spmm_binary_ops.h
src/array/cpu/spmm_binary_ops.h
+4
-2
src/array/cuda/utils.h
src/array/cuda/utils.h
+2
-2
No files found.
src/array/cpu/sddmm.cc
View file @
0b57ce18
...
...
@@ -50,7 +50,7 @@ namespace aten {
typedef double DType; \
{ __VA_ARGS__ } \
} else { \
LOG(FATAL) << "Data type not re
n
ogized with bits " << bits; \
LOG(FATAL) << "Data type not re
c
og
n
ized with bits " << bits; \
} \
} while (0)
...
...
src/array/cpu/spmm_binary_ops.h
View file @
0b57ce18
...
...
@@ -148,14 +148,16 @@ constexpr DType Min<DType>::zero;
#define SWITCH_BITS(bits, DType, ...) \
do { \
if ((bits) == 16 || (bits) == 32) { \
if ((bits) == 16) { \
LOG(FATAL) << "FP16 not supported on CPU"; \
} else if ((bits) == 32) { \
typedef float DType; \
{ __VA_ARGS__ } \
} else if ((bits) == 64) { \
typedef double DType; \
{ __VA_ARGS__ } \
} else { \
LOG(FATAL) << "Data type not re
n
ogized with bits " << bits; \
LOG(FATAL) << "Data type not re
c
og
n
ized with bits " << bits; \
} \
} while (0)
...
...
src/array/cuda/utils.h
View file @
0b57ce18
...
...
@@ -31,7 +31,7 @@ namespace cuda {
typedef double DType; \
{ __VA_ARGS__ } \
} else { \
LOG(FATAL) << "Data type not re
n
ogized with bits " << bits; \
LOG(FATAL) << "Data type not re
c
og
n
ized with bits " << bits; \
} \
} while (0)
#else // USE_FP16
...
...
@@ -44,7 +44,7 @@ namespace cuda {
typedef double DType; \
{ __VA_ARGS__ } \
} else { \
LOG(FATAL) << "Data type not re
n
ogized with bits " << bits; \
LOG(FATAL) << "Data type not re
c
og
n
ized with bits " << bits; \
} \
} while (0)
#endif // USE_FP16
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment