How to fix this warning about bool type mismatch?

I am getting tons of this warnings:

[W TensorAdvancedIndexing.cpp:1391] Warning: masked_fill_ received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead. (function masked_fill_impl_cpu)

my mask is specified as tensor:kBool type, but it keeps complaining about it.
how can I fix it ? please help.

my code as below:

auto inputs = at::from_blob(, {1, num}, at::kFloat).reshape({1, frame_count, dimension_size});
torch::Tensor length = torch::tensor({frame_count}, {torch::kInt64});

auto mask = torch::ones({1, frame_count}, torch::kBool);
//auto options = torch::TensorOptions().dtype(torch::kBool);
// auto mask = torch::ones({1, frame_count}, options);

std::vector<torch::jit::IValue> feat_inputs;
torch::Tensor outputs = module.forward(feat_inputs).toTensor();

or how can i disable this warning? it complicates the log with useless messages.