Skip to content

Commit 127ff22

Browse files
authored
bugfix: fix some compiler pre-check. (#859)
I am using flashinfer as the c++ backend to make some development. Find two compiler-check error: 1. shouldn't use `move` in returning local object. 2. `num_cluster` is `int32_t`, but in for-loop, it is compared to `uint32_t i = 0`
1 parent 1231080 commit 127ff22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/flashinfer/attention/scheduler.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ std::vector<T> flatten(const std::vector<std::vector<T>>& vec, int size_after_fl
777777
for (const auto& inner_vec : vec) {
778778
result.insert(result.end(), inner_vec.begin(), inner_vec.end());
779779
}
780-
return std::move(result);
780+
return result;
781781
}
782782

783783
struct PrefillPlanSM90Info {
@@ -1050,7 +1050,7 @@ inline cudaError_t MLAPlan(void* float_buffer, size_t float_workspace_size_in_by
10501050
} else {
10511051
cluster_size = 1; // one cta in a cluster
10521052
}
1053-
int num_clusters = num_sm / cluster_size;
1053+
uint32_t num_clusters = num_sm / cluster_size;
10541054
plan_info.num_blks_x = cluster_size;
10551055
plan_info.num_blks_y = num_clusters;
10561056
const int cta_tile_q = 64;

0 commit comments

Comments
 (0)