def test_on_device_free():
    x = relay.Var("x")
    call = relay.annotation.on_device(x, "cuda", constrain_result=False, constrain_body=False)
    assert call.attrs.virtual_device.device_type_int == -1  # ie kInvalidDeviceType
    assert not call.attrs.constrain_body
    assert not call.attrs.constrain_result