Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fp16 support for top_k operator #12705

Closed
eric-haibin-lin opened this issue Sep 29, 2018 · 1 comment
Closed

Fp16 support for top_k operator #12705

eric-haibin-lin opened this issue Sep 29, 2018 · 1 comment

Comments

@eric-haibin-lin
Copy link
Member

mxnet.base.MXNetError: [05:47:56] src/operator/tensor/./ordering_op-inl.h:535: This operation does not support float16

Stack trace returned 10 entries:
[bt] (0) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(dmlc::StackTrace[abi:cxx11]()+0x5b) [0x7fb560c3385b]
[bt] (1) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x28) [0x7fb560c343c8]
[bt] (2) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(void mxnet::op::TopK<mshadow::gpu>(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&)+0x275) [0x7fb564a47565]
[bt] (3) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(mxnet::imperative::PushFCompute(std::function<void (nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&)> const&, nnvm::Op const*, nnvm::NodeAttrs const&, mxnet::Context const&, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*> > const&, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*> > const&, std::vector<mxnet::Resource, std::allocator<mxnet::Resource> > const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> > const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> > const&, std::vector<unsigned int, std::allocator<unsigned int> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&)::{lambda(mxnet::RunContext)#1}::operator()(mxnet::RunContext) const+0x29d) [0x7fb563653f1d]
[bt] (4) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(+0x3cdc76b) [0x7fb563bb076b]
[bt] (5) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(mxnet::engine::ThreadedEngine::ExecuteOprBlock(mxnet::RunContext, mxnet::engine::OprBlock*)+0x8f5) [0x7fb563baaed5]
[bt] (6) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(void mxnet::engine::ThreadedEnginePerDevice::GPUWorker<(dmlc::ConcurrentQueueType)0>(mxnet::Context, bool, mxnet::engine::ThreadedEnginePerDevice::ThreadWorkerBlock<(dmlc::ConcurrentQueueType)0>*, std::shared_ptr<dmlc::ManualEvent> const&)+0xeb) [0x7fb563bc16ab]
[bt] (7) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(std::_Function_handler<void (std::shared_ptr<dmlc::ManualEvent>), mxnet::engine::ThreadedEnginePerDevice::PushToExecute(mxnet::engine::OprBlock*, bool)::{lambda()#4}::operator()() const::{lambda(std::shared_ptr<dmlc::ManualEvent>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<dmlc::ManualEvent>&&)+0x4e) [0x7fb563bc191e]
[bt] (8) /home/ubuntu/batchdot/python/mxnet/../../lib/libmxnet.so(std::thread::_Impl<std::_Bind_simple<std::function<void (std::shared_ptr<dmlc::ManualEvent>)> (std::shared_ptr<dmlc::ManualEvent>)> >::_M_run()+0x4a) [0x7fb563baa4ca]
[bt] (9) /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb8c80) [0x7fb57b9a0c80]

TopK is commonly used for metrics and building block for machine translation networks. This should be supported.

@apeforest
Copy link
Contributor

apeforest commented Dec 15, 2018

@mxnet-label-bot Add [Call for contribution, Good for first time]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants