Unverified Commit 1329be96 authored by Songqing Zhang's avatar Songqing Zhang Committed by GitHub
Browse files

[Misc] Fix build warnings (#5303)


Co-authored-by: default avatarsongqing.zhang <songqing.zhang@shopee.com>
parent 85dfcea0
...@@ -130,7 +130,6 @@ void SpMMSumCsr( ...@@ -130,7 +130,6 @@ void SpMMSumCsr(
const IdType* edges = csr.data.Ptr<IdType>(); const IdType* edges = csr.data.Ptr<IdType>();
const DType* X = ufeat.Ptr<DType>(); const DType* X = ufeat.Ptr<DType>();
const DType* W = efeat.Ptr<DType>(); const DType* W = efeat.Ptr<DType>();
int64_t dim = bcast.out_len;
DType* O = out.Ptr<DType>(); DType* O = out.Ptr<DType>();
CHECK_NOTNULL(indptr); CHECK_NOTNULL(indptr);
CHECK_NOTNULL(O); CHECK_NOTNULL(O);
...@@ -160,7 +159,7 @@ void SpMMSumCsr( ...@@ -160,7 +159,7 @@ void SpMMSumCsr(
ElemWiseUpd* cpu_spec = (asm_kernel_ptr && asm_kernel_ptr->applicable()) ElemWiseUpd* cpu_spec = (asm_kernel_ptr && asm_kernel_ptr->applicable())
? asm_kernel_ptr.get() ? asm_kernel_ptr.get()
: nullptr; : nullptr;
if (cpu_spec && dim > 16 && !bcast.use_bcast) { if (cpu_spec && bcast.out_len > 16 && !bcast.use_bcast) {
SpMMSumCsrXbyak<IdType, DType, Op>(cpu_spec, bcast, csr, X, W, O); SpMMSumCsrXbyak<IdType, DType, Op>(cpu_spec, bcast, csr, X, W, O);
} else { } else {
#endif // USE_AVX #endif // USE_AVX
......
...@@ -41,6 +41,7 @@ int32_t Ver2partition(IdType in_val, int64_t *node_map, int32_t num_parts) { ...@@ -41,6 +41,7 @@ int32_t Ver2partition(IdType in_val, int64_t *node_map, int32_t num_parts) {
pos = pos + 1; pos = pos + 1;
} }
LOG(FATAL) << "Error: Unexpected output in Ver2partition!"; LOG(FATAL) << "Error: Unexpected output in Ver2partition!";
return -1;
} }
/** /**
......
...@@ -183,11 +183,13 @@ class RangePartition : public NDArrayPartition { ...@@ -183,11 +183,13 @@ class RangePartition : public NDArrayPartition {
<< ") for " << ") for "
"partition of size " "partition of size "
<< NumParts() << "."; << NumParts() << ".";
int64_t part_size = -1;
ATEN_ID_TYPE_SWITCH(range_cpu_->dtype, RangeType, { ATEN_ID_TYPE_SWITCH(range_cpu_->dtype, RangeType, {
const RangeType* const ptr = const RangeType* const ptr =
static_cast<const RangeType*>(range_cpu_->data); static_cast<const RangeType*>(range_cpu_->data);
return ptr[part_id + 1] - ptr[part_id]; part_size = ptr[part_id + 1] - ptr[part_id];
}); });
return part_size;
} }
private: private:
......
...@@ -47,7 +47,6 @@ class RPCClient { ...@@ -47,7 +47,6 @@ class RPCClient {
++recv_id; ++recv_id;
} }
} }
const int num_machines = ips_.size();
for (int i = 0; i < kNumMessage; ++i) { for (int i = 0; i < kNumMessage; ++i) {
for (int n = 0; n < recv_id; ++n) { for (int n = 0; n < recv_id; ++n) {
dgl::rpc::RPCMessage msg; dgl::rpc::RPCMessage msg;
......
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