Skip to content

Commit

Permalink
support dense_to_jagged long cpu (#1229)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1229

* support long type for dense_to_jagged cpu op, as mirrored in GPU.

Reviewed By: xing-liu

Differential Revision: D38290666

fbshipit-source-id: c81e071f5fd38126812487305f63900b6dc7d08f
  • Loading branch information
YazhiGao authored and facebook-github-bot committed Aug 1, 2022
1 parent de788f2 commit 5f96a6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fbgemm_gpu/src/jagged_tensor_ops_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,12 @@ class DenseToJaggedCPUOp
auto values = at::empty({total_L_computed, D}, dense.options());
auto output = at::zeros({total_L_computed, D}, dense.options());

AT_DISPATCH_FLOATING_TYPES_AND_HALF(
values.scalar_type(), "jagged_scalars", [&] {
AT_DISPATCH_FLOATING_TYPES_AND2(
at::ScalarType::Half,
at::ScalarType::Long,
values.scalar_type(),
"jagged_scalars",
[&] {
jagged_dense_elementwise_jagged_output_<scalar_t>(
values,
offsets,
Expand Down

0 comments on commit 5f96a6d

Please sign in to comment.