Merged
Merged
Conversation
umar456
changed the title
Implement f16 support
Initial f16 support
Merged
| /// \returns true if the \p device supports half precision operations. | ||
| /// false otherwise | ||
| /// \ingroup device_func_half | ||
| AFAPI bool isHalfAvailable(const int device); |
| /// \returns true if the \p device supports half precision operations. | ||
| /// false otherwise | ||
| /// \ingroup device_func_half | ||
| AFAPI bool isHalfAvailable(const int device); |
| // create a list of types to be tested | ||
| typedef ::testing::Types<float, double, cfloat, cdouble, int, unsigned int, | ||
| intl, uintl, char, unsigned char, short, ushort> | ||
| intl, uintl, char, unsigned char, short, ushort, af_half> |
|
|
||
| const af::cdouble &operator+(const af::cdouble &val) { return val; } | ||
|
|
||
| const af_half& operator+(const af_half& val) { |
| return lhs.data_ == rhs.data_; | ||
| } | ||
|
|
||
| std::ostream &operator<<(std::ostream &os, const af_half &val) { |
* Add half support for gemm * Add half support for JIT * Set the c++ standard to c++14 internally * Add support functions for half support. * Add half support to reductions. * Add support for join
| ASSERT_ARRAYS_EQ(gold, out); | ||
| } | ||
|
|
||
| // TODO(umar): HalfMax |
| EXPECT_TRUE(one.isreal()); | ||
| EXPECT_FALSE(one.iscomplex()); | ||
| EXPECT_FALSE(one.isbool()); | ||
| EXPECT_FALSE(one.ishalf()); |
Labels
None yet