Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Setup for newer operator routines which have large and small float types #236

Merged
merged 29 commits into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4d1fc8c
Fix warnings, build adjustments in CMake
Jan 31, 2017
d01a0b0
fix cuda variable-declaration order problems
Jan 31, 2017
d55cf64
Remove gpu flavors below 30, no longer compatible
Feb 1, 2017
97699df
fix cuda variable-declaration order problems
Jan 31, 2017
91efae6
Add nvcc --run cuda library path flag for when detecting gpu flavor
Feb 10, 2017
a6ed871
Merge remote-tracking branch 'DMLC/master' into cj
Feb 10, 2017
db6e78b
CMake build asjustments, remove signed/unsigned warnings
Mar 7, 2017
a358303
Allow CUDA_LIBRARY_PATH to not be defined
Mar 9, 2017
89a1598
Merge branch 'master' into master
cjolivier01 Mar 9, 2017
bd92326
Minor visibility adjustments
Mar 15, 2017
b4d61ad
Remove more warnings
Mar 10, 2017
2390249
Merge branch 'master' into master
cjolivier01 Mar 21, 2017
69090b9
use static_cast instead of ()
Mar 23, 2017
cf6ef48
Fix warnings
cjolivier01 Mar 25, 2017
ed23ae9
Fix link error, undefined kSize
cjolivier01 Mar 27, 2017
d37ca4b
Size() for kPlain packet
cjolivier01 Mar 27, 2017
1748a04
fix: Ignored test directory
Mar 29, 2017
4e6503d
Fix lint, re-apply kSize fix
cjolivier01 Apr 3, 2017
61bb318
Merge branch 'master' into cjmaster
Apr 14, 2017
bcdd3fb
Merge branch 'dmlc_master' into cjmaster
Apr 14, 2017
5aa6d71
Add MSHADOW_REAL_TYPE_SWITCH_EX with large type
cjolivier01 Apr 19, 2017
d67613c
Add MSHADOW_REAL_TYPE_SWITCH_EX with large type
cjolivier01 Apr 19, 2017
0041ca9
Merge remote-tracking branch 'origin/master' into cjmaster
cjolivier01 Apr 26, 2017
cf0ac28
Merge remote-tracking branch 'origin/master' into cjmaster
cjolivier01 Apr 26, 2017
c75c67f
Building with cuda batch norm skeleton
Apr 17, 2017
91871f0
Finalizing test permutations
Apr 19, 2017
25a9a83
Visual C++ has an issue with macros substituted by their own name?
Apr 24, 2017
96600fc
fixed bug with testing suite for double (Float64)
Apr 25, 2017
0dfdbe6
float is good enough
Apr 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions mshadow/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,46 @@ struct minimum {
"floating point types not uint8"; \
break; \
case mshadow::kInt32: \
LOG(FATAL) << "This operation only support " \
"floating point types, not int32"; \
break; \
default: \
LOG(FATAL) << "Unknown type enum " << type; \
LOG(FATAL) << "This operation only support " \
"floating point types, not int32";\
break; \
default: \
LOG(FATAL) << "Unknown type enum " << type; \
}

#define MSHADOW_REAL_TYPE_SWITCH_EX(type$, DType$, DLargeType$, ...) \
switch (type$) { \
case mshadow::kFloat32: \
{ \
typedef float DType$; \
typedef float DLargeType$; \
{__VA_ARGS__} \
} \
break; \
case mshadow::kFloat64: \
{ \
typedef double DType$; \
typedef double DLargeType$; \
{__VA_ARGS__} \
} \
break; \
case mshadow::kFloat16: \
{ \
typedef mshadow::half::half_t DType$; \
typedef float DLargeType$; \
{__VA_ARGS__} \
} \
break; \
case mshadow::kUint8: \
LOG(FATAL) << "This operation only support " \
"floating point types not uint8"; \
break; \
case mshadow::kInt32: \
LOG(FATAL) << "This operation only support " \
"floating point types, not int32";\
break; \
default: \
LOG(FATAL) << "Unknown type enum " << type$; \
}

#define MSHADOW_LAYOUT_SWITCH(layout, Layout, ...) \
Expand Down
1 change: 1 addition & 0 deletions mshadow/dot_engine-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ inline void GetBatchedView(DType **dst, DType *src, int num, int stride,
}
}
#ifdef __CUDACC__
namespace cuda {};
template<typename DType>
inline void GetBatchedView(DType **dst, DType *src, int num, int stride,
Stream<gpu> *stream) {
Expand Down