Allow targets to pass with -fsanitize=null
under --config=asan
.
PiperOrigin-RevId: 306939167 Change-Id: Ibe3a9a0f627d74bbebf93af8b0badd92e9c5abef
This commit is contained in:
parent
9d0c55d9f0
commit
e2f04be483
@ -1272,20 +1272,23 @@ Status FastParseExample(const Config& config,
|
|||||||
SparseBuffer& buffer = sparse_buffers[i][d];
|
SparseBuffer& buffer = sparse_buffers[i][d];
|
||||||
|
|
||||||
// Update indices.
|
// Update indices.
|
||||||
int64* ix_p = &indices->matrix<int64>()(offset, 0);
|
|
||||||
size_t delta = 0;
|
size_t delta = 0;
|
||||||
size_t example_index = first_example_of_minibatch(i);
|
|
||||||
for (size_t example_end_index : buffer.example_end_indices) {
|
if (indices->NumElements() > 0) {
|
||||||
size_t feature_index = 0;
|
int64* ix_p = &indices->matrix<int64>()(offset, 0);
|
||||||
for (; delta < example_end_index; ++delta) {
|
size_t example_index = first_example_of_minibatch(i);
|
||||||
// Column 0: example index
|
for (size_t example_end_index : buffer.example_end_indices) {
|
||||||
*ix_p = example_index;
|
size_t feature_index = 0;
|
||||||
// Column 1: the feature index buffer example
|
for (; delta < example_end_index; ++delta) {
|
||||||
*(ix_p + 1) = feature_index;
|
// Column 0: example index
|
||||||
ix_p += 2;
|
*ix_p = example_index;
|
||||||
++feature_index;
|
// Column 1: the feature index buffer example
|
||||||
|
*(ix_p + 1) = feature_index;
|
||||||
|
ix_p += 2;
|
||||||
|
++feature_index;
|
||||||
|
}
|
||||||
|
++example_index;
|
||||||
}
|
}
|
||||||
++example_index;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CopySparseBufferToTensor(config.sparse[d].dtype, offset, &buffer, values);
|
CopySparseBufferToTensor(config.sparse[d].dtype, offset, &buffer, values);
|
||||||
|
Loading…
Reference in New Issue
Block a user