forked from mindspore-Ecosystem/mindspore
Fix static
This commit is contained in:
parent
7849ff8c9d
commit
01302b9fa9
|
@ -99,7 +99,7 @@ bool GetSecretsKernel::Launch(const std::vector<AddressPtr> &inputs, const std::
|
|||
GenerateOutput(outputs, fbb->GetBufferPointer(), fbb->GetSize());
|
||||
return true;
|
||||
}
|
||||
if (!CountForGetSecrets(fbb, get_secrets_req, iter_num)) {
|
||||
if (!CountForGetSecrets(fbb, get_secrets_req, SizeToInt(iter_num))) {
|
||||
GenerateOutput(outputs, fbb->GetBufferPointer(), fbb->GetSize());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ class Server {
|
|||
|
||||
// Variables set by ps context.
|
||||
#ifdef ENABLE_ARMOUR
|
||||
armour::CipherInit *cipher_init_;
|
||||
armour::CipherInit *cipher_init_{nullptr};
|
||||
#endif
|
||||
std::string scheduler_ip_;
|
||||
uint16_t scheduler_port_;
|
||||
|
|
|
@ -214,12 +214,12 @@ kernel::KernelBuildInfoPtr Util::GenerateKernelBuildInfo(const std::vector<AnfNo
|
|||
MS_EXCEPTION_IF_NULL(cnode);
|
||||
size_t input_num = AnfAlgo::GetInputTensorNum(cnode);
|
||||
for (size_t input_index = 0; input_index < input_num; ++input_index) {
|
||||
inputs_device_format.emplace_back(kOpFormat_DEFAULT);
|
||||
(void)inputs_device_format.emplace_back(kOpFormat_DEFAULT);
|
||||
inputs_device_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(cnode, input_index));
|
||||
}
|
||||
size_t output_num = AnfAlgo::GetOutputTensorNum(cnode);
|
||||
for (size_t output_index = 0; output_index < output_num; ++output_index) {
|
||||
outputs_device_format.emplace_back(kOpFormat_DEFAULT);
|
||||
(void)outputs_device_format.emplace_back(kOpFormat_DEFAULT);
|
||||
outputs_device_type.push_back(AnfAlgo::GetOutputInferDataType(cnode, output_index));
|
||||
outputs_shape.push_back(AnfAlgo::GetOutputInferShape(cnode, output_index));
|
||||
}
|
||||
|
|
|
@ -740,8 +740,8 @@ void Worker::SparsePartitioner(const KVMessage &send, PartitionKVMessages *parti
|
|||
iter = attrs.find(kOutDimSize);
|
||||
size_t outer_dim_size = static_cast<size_t>(iter->second);
|
||||
|
||||
size_t grad_size = send.len()[grad_index];
|
||||
size_t indice_size = send.len()[indice_index];
|
||||
size_t grad_size = send.len()[SizeToInt(grad_index)];
|
||||
size_t indice_size = send.len()[SizeToInt(indice_index)];
|
||||
size_t segment_size = grad_size / indice_size;
|
||||
|
||||
size_t grad_offset = 0;
|
||||
|
|
Loading…
Reference in New Issue