Add str[] float[] constants resubmit

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/31791

Test Plan: Imported from OSS

Reviewed By: driazati

Differential Revision: D19439513

Pulled By: eellison

fbshipit-source-id: a04c7401687b051f0d4fb4794963931ebe004194
This commit is contained in:
Elias Ellison
2020-01-22 12:09:46 -08:00
committed by Facebook Github Bot
parent e184a8843c
commit adf0916606
8 changed files with 86 additions and 48 deletions

View File

@ -203,6 +203,17 @@ graph(%0 : Tensor,
)IR");
}
{
checkRoundtrip(
R"IR(
graph():
%0 : float[] = prim::Constant[value=[1., 2., 3.]]()
%1 : str[] = prim::Constant[value=["ab", "cd", "ef"]]()
%2 : (float[], str[]) = prim::TupleConstruct(%0, %1)
return (%2)
)IR");
}
{
bool error_thrown = false;
try {