connorgoggins commented on a change in pull request #17599: Fixed Embedding op for LT input URL: https://github.com/apache/incubator-mxnet/pull/17599#discussion_r380334678
########## File path: src/operator/tensor/indexing_op.h ########## @@ -66,7 +66,7 @@ enum QuantizedEmbeddingOpResource {kTempSpace}; struct SparseEmbeddingParam: public dmlc::Parameter<SparseEmbeddingParam> { - int input_dim; + index_t input_dim; int output_dim; Review comment: @apeforest excellent point, there would be. For example, the following call throws an error: ``` >>> mx.nd.Embedding(data=mx.nd.random_normal(shape=(1,)), weight=mx.nd.random_normal(shape=(1,2**32)), input_dim=1, output_dim=2**32) mxnet.base.MXNetError: MXNetError: Invalid Parameter format for output_dim expect int but value='4294967296', in operator Embedding(name="", output_dim="4294967296", input_dim="1") ``` With my latest update (changing the dtype of `output_dim` to `index_t`), here is the result: ``` >>> mx.nd.Embedding(data=mx.nd.random_normal(shape=(1,)), weight=mx.nd.random_normal(shape=(1,2**32)), input_dim=1, output_dim=2**32) [[ 1.6323917 -0.33354783 -1.7378405 ... -0.36648417 0.6363522 2.367109 ]] <NDArray 1x4294967296 @cpu(0)> ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services