[Apache TVM Discuss] [Development/pre-RFC] [RFC] Bifurcation of APIs across Python and C++: A Case Study and Recommendations for Prevention

2021-06-09 Thread Lily Orth-Smith via Apache TVM Discuss
## This RFC is a case study on unifying the lower API, which had implementations in both Python and C++. I'll call the duplication of APIs in Python and C++ "bifurcation" or "bifurcation of the API". I'll conclude by analyzing how this bifurcation happened in the first place, and then presen

[Apache TVM Discuss] [Development/RFC] [RFC][Quantization] A new quantization framework in TVM: initial RFC (1/4)

2021-04-26 Thread Lily Orth-Smith via Apache TVM Discuss
Also, as part of the standardization of QNN, we could ensure that all QNN "compute" ops go from `int8 -> int8` . I believe that `qnn.conv2d` is the only QNN op that outputs an accumulation dtype, so we could change `qnn.conv2d` to take in bias in addition to the data and weight. --- [Visi

[Apache TVM Discuss] [Development/RFC] [RFC][Quantization] A new quantization framework in TVM: initial RFC (1/4)

2021-04-26 Thread Lily Orth-Smith via Apache TVM Discuss
[quote="anijain2305, post:20, topic:9775"] I am trying to understand why we need `qnn.conv2d*` (* represents operator along the lines of `qnn.simulated_conv2d`) during calibration. The only reason would be if you want to propagate the error from previous operators while **calibrating** current

[Apache TVM Discuss] [Development/RFC] [RFC][Quantization] A new quantization framework in TVM: initial RFC (1/4)

2021-04-26 Thread Lily Orth-Smith via Apache TVM Discuss
@mikeseven Yes, the goal is to create a fully quantized graph, and we do recognize that this transformation will change the output of the graph. For this reason, we're not going to present the rewrite as a Relay pass. And I definitely agree that we should let there be user-defined handling. A

[Apache TVM Discuss] [Development/RFC] DataLoader -- an API to wrap datasets from other machine learning frameworks

2021-03-29 Thread Lily Orth-Smith via Apache TVM Discuss
@altanh Thanks for the input. I think you're right, knowledge of the layout is not required, and I can remove that. With regard to your concern about the list of ndarrays -- the ndarrays in the list are meant to be batched (I should make this clearer in the documentation, though). The intenti

[Apache TVM Discuss] [Development/RFC] DataLoader -- an API to wrap datasets from other machine learning frameworks

2021-03-24 Thread Lily Orth-Smith via Apache TVM Discuss
I guess having the user transform them into numpy before comparison is OK for now, and to be consistent I'll make both data and labels `tvm.runtime.ndarrays`. I can put a note in the documentation that they need to convert them to numpy arrays before comparing them. It would be nice if there

[Apache TVM Discuss] [Development/RFC] DataLoader -- an API to wrap datasets from other machine learning frameworks

2021-03-24 Thread Lily Orth-Smith via Apache TVM Discuss
Also, it appears that `tvm.runtime.ndarray` only has one method for comparing ndarrays, same_as, and same_as checks object identity equality, not value equality. If the output of running a relay mod is a `tvm.runtime.ndarray`, and the labels are also a `tvm.runtime.ndarray`, it seems that th

[Apache TVM Discuss] [Development/RFC] DataLoader -- an API to wrap datasets from other machine learning frameworks

2021-03-24 Thread Lily Orth-Smith via Apache TVM Discuss
Thanks for the feedback @tqchen @jwfromm. I'll move the the code to the namespace `tvm.utils.data`, and set batch_size and num_batches through the @property decorator. I do agree that future support of zero copy through DLPack is interesting, so it's worth considering using `tvm.runtime.ndar