Unverified Commit 53b39f06 authored by Jinjing Zhou's avatar Jinjing Zhou Committed by GitHub
Browse files

[Error Message] Improve the error message (#1342)

* patch

* fix+1

* add readme

* fix error message
parent a0139923
......@@ -9,6 +9,7 @@
#include <dgl/runtime/ndarray.h>
#include <cstdint>
#include "../c_api_common.h"
namespace dgl {
namespace kernel {
......@@ -48,10 +49,9 @@ namespace kernel {
#define DGL_DTYPE_SWITCH(val, DType, ...) \
if (val.code == kDLFloat && val.bits == 32) { \
typedef float DType; \
{__VA_ARGS__} \
{ __VA_ARGS__ } \
} else { \
LOG(FATAL) << "Unsupported dtype: " << val.code << "_" \
<< val.bits; \
LOG(FATAL) << "Unsupported dtype: " << val; \
}
// Macro for unrolling with data type arguments.
......
......@@ -85,7 +85,7 @@ class DeviceAPIManager {
auto* f = Registry::Get(factory);
if (f == nullptr) {
CHECK(allow_missing)
<< "Device API " << name << " is not enabled.";
<< "Device API " << name << " is not enabled. Please install the cuda version of dgl.";
return nullptr;
}
void* ptr = (*f)();
......
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