mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 06:43:13 +08:00
Fixed contractions of fp16
This commit is contained in:
parent
7168afde5e
commit
7a570e50ef
@ -63,7 +63,7 @@ static inline EIGEN_DEVICE_FUNC float half_to_float(__half h);
|
|||||||
|
|
||||||
// Class definition.
|
// Class definition.
|
||||||
struct half : public __half {
|
struct half : public __half {
|
||||||
EIGEN_DEVICE_FUNC half() : __half(internal::raw_uint16_to_half(0)) {}
|
EIGEN_DEVICE_FUNC half() {}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC half(const __half& h) : __half(h) {}
|
EIGEN_DEVICE_FUNC half(const __half& h) : __half(h) {}
|
||||||
EIGEN_DEVICE_FUNC half(const half& h) : __half(h) {}
|
EIGEN_DEVICE_FUNC half(const half& h) : __half(h) {}
|
||||||
|
@ -134,7 +134,7 @@ void test_cuda_elementwise() {
|
|||||||
gpu_device.deallocate(d_res_float);
|
gpu_device.deallocate(d_res_float);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void test_cuda_contractions() {
|
void test_cuda_contractions() {
|
||||||
Eigen::CudaStreamDevice stream;
|
Eigen::CudaStreamDevice stream;
|
||||||
Eigen::GpuDevice gpu_device(&stream);
|
Eigen::GpuDevice gpu_device(&stream);
|
||||||
@ -181,7 +181,7 @@ void test_cuda_contractions() {
|
|||||||
gpu_device.deallocate(d_float2);
|
gpu_device.deallocate(d_float2);
|
||||||
gpu_device.deallocate(d_res_half);
|
gpu_device.deallocate(d_res_half);
|
||||||
gpu_device.deallocate(d_res_float);
|
gpu_device.deallocate(d_res_float);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
void test_cuda_reductions() {
|
void test_cuda_reductions() {
|
||||||
@ -244,7 +244,7 @@ void test_cxx11_tensor_of_float16_cuda()
|
|||||||
CALL_SUBTEST_1(test_cuda_conversion());
|
CALL_SUBTEST_1(test_cuda_conversion());
|
||||||
CALL_SUBTEST_1(test_cuda_unary());
|
CALL_SUBTEST_1(test_cuda_unary());
|
||||||
CALL_SUBTEST_1(test_cuda_elementwise());
|
CALL_SUBTEST_1(test_cuda_elementwise());
|
||||||
// CALL_SUBTEST_2(test_cuda_contractions());
|
CALL_SUBTEST_2(test_cuda_contractions());
|
||||||
CALL_SUBTEST_3(test_cuda_reductions());
|
CALL_SUBTEST_3(test_cuda_reductions());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user