|
15 | 15 | EthosU85PipelineINT,
|
16 | 16 | TosaPipelineFP,
|
17 | 17 | TosaPipelineINT,
|
| 18 | + VgfPipeline, |
18 | 19 | )
|
19 | 20 |
|
20 | 21 | aten_op = "torch.ops.aten.sigmoid.default" # Used for checking that we do not have softmax in the graph after decompose
|
@@ -154,3 +155,101 @@ def test_sigmoid_u85_INT(test_data: Tuple):
|
154 | 155 | run_on_fvp=False,
|
155 | 156 | )
|
156 | 157 | pipeline.run()
|
| 158 | + |
| 159 | + |
| 160 | +@common.parametrize("test_data", test_data_suite) |
| 161 | +@common.SkipIfNoModelConverter |
| 162 | +def test_sigmoid_vgf_FP(test_data: Tuple): |
| 163 | + pipeline = VgfPipeline[input_t1]( |
| 164 | + Sigmoid(), |
| 165 | + (test_data(),), |
| 166 | + aten_op, |
| 167 | + exir_op, |
| 168 | + tosa_version="TOSA-1.0+FP", |
| 169 | + ) |
| 170 | + pipeline.run() |
| 171 | + |
| 172 | + |
| 173 | +@common.parametrize("test_data", test_data_suite) |
| 174 | +@common.SkipIfNoModelConverter |
| 175 | +def test_sigmoid_vgf_INT(test_data: Tuple): |
| 176 | + pipeline = VgfPipeline[input_t1]( |
| 177 | + Sigmoid(), |
| 178 | + (test_data(),), |
| 179 | + aten_op, |
| 180 | + exir_op, |
| 181 | + tosa_version="TOSA-1.0+INT", |
| 182 | + ) |
| 183 | + pipeline.run() |
| 184 | + |
| 185 | + |
| 186 | +@common.SkipIfNoModelConverter |
| 187 | +def test_sigmoid_vgf_FP_add(): |
| 188 | + pipeline = VgfPipeline[input_t1]( |
| 189 | + AddSigmoid(), |
| 190 | + (test_data_suite["zeros"](),), |
| 191 | + aten_op, |
| 192 | + exir_op, |
| 193 | + tosa_version="TOSA-1.0+FP", |
| 194 | + ) |
| 195 | + pipeline.run() |
| 196 | + |
| 197 | + |
| 198 | +@common.SkipIfNoModelConverter |
| 199 | +def test_sigmoid_vgf_INT_add(): |
| 200 | + pipeline = VgfPipeline[input_t1]( |
| 201 | + AddSigmoid(), |
| 202 | + (test_data_suite["ramp"](),), |
| 203 | + aten_op, |
| 204 | + exir_op, |
| 205 | + tosa_version="TOSA-1.0+INT", |
| 206 | + ) |
| 207 | + pipeline.run() |
| 208 | + |
| 209 | + |
| 210 | +@common.SkipIfNoModelConverter |
| 211 | +def test_sigmoid_vgf_FP_add_2(): |
| 212 | + pipeline = VgfPipeline[input_t1]( |
| 213 | + SigmoidAdd(), |
| 214 | + (test_data_suite["zeros"](),), |
| 215 | + aten_op, |
| 216 | + exir_op, |
| 217 | + tosa_version="TOSA-1.0+FP", |
| 218 | + ) |
| 219 | + pipeline.run() |
| 220 | + |
| 221 | + |
| 222 | +@common.SkipIfNoModelConverter |
| 223 | +def test_sigmoid_vgf_INT_add_2(): |
| 224 | + pipeline = VgfPipeline[input_t1]( |
| 225 | + SigmoidAdd(), |
| 226 | + (test_data_suite["zeros"](),), |
| 227 | + aten_op, |
| 228 | + exir_op, |
| 229 | + tosa_version="TOSA-1.0+INT", |
| 230 | + ) |
| 231 | + pipeline.run() |
| 232 | + |
| 233 | + |
| 234 | +@common.SkipIfNoModelConverter |
| 235 | +def test_sigmoid_vgf_FP_add_3(): |
| 236 | + pipeline = VgfPipeline[input_t1]( |
| 237 | + SigmoidAddSigmoid(), |
| 238 | + (test_data_suite["randn_neg"](), test_data_suite["randn_pos"]()), |
| 239 | + aten_op, |
| 240 | + exir_op, |
| 241 | + tosa_version="TOSA-1.0+FP", |
| 242 | + ) |
| 243 | + pipeline.run() |
| 244 | + |
| 245 | + |
| 246 | +@common.SkipIfNoModelConverter |
| 247 | +def test_sigmoid_vgf_INT_add_3(): |
| 248 | + pipeline = VgfPipeline[input_t1]( |
| 249 | + SigmoidAddSigmoid(), |
| 250 | + (test_data_suite["randn_neg"](), test_data_suite["randn_pos"]()), |
| 251 | + aten_op, |
| 252 | + exir_op, |
| 253 | + tosa_version="TOSA-1.0+INT", |
| 254 | + ) |
| 255 | + pipeline.run() |
0 commit comments