#include <arm_compute/runtime/CL/functions/CLStridedSlice.h>
#include <arm_compute/runtime/CL/functions/CLSoftmaxLayer.h>
#include <arm_compute/runtime/CL/functions/CLGather.h>
+#include <arm_compute/runtime/CL/functions/CLHashtableLookup.h>
#include <arm_compute/runtime/CL/functions/CLTopKV2.h>
#include <arm_compute/runtime/CL/functions/CLCast.h>
#include <arm_compute/runtime/CL/functions/CLConvolutionLayer.h>
auto values_alloc = ctx.at(::internal::tflite::operand::Index{param.values_index});
auto keys_alloc = ctx.at(::internal::tflite::operand::Index{param.keys_index});
- auto fn = nnfw::make_unique<HashtableLookupLayer>();
+ if (from_env<bool>(std::getenv("USE_SIMPLE_HASHTABLELOOKUP")))
+ {
+ auto fn = nnfw::make_unique<HashtableLookupLayer>();
+
+ fn->configure(lookups_alloc, keys_alloc, values_alloc, output_alloc, hits_alloc);
+
+ builder.append("HashtableLookup", std::move(fn));
+ }
+ else if (::internal::arm_compute::isGpuMode()) // GPU
+ {
+ auto fn = nnfw::make_unique<::arm_compute::CLHashtableLookup>();
- fn->configure(lookups_alloc, keys_alloc, values_alloc, output_alloc, hits_alloc);
+ fn->configure(CAST_CL(lookups_alloc), CAST_CL(keys_alloc), CAST_CL(values_alloc),
+ CAST_CL(output_alloc), CAST_CL(hits_alloc));
- builder.append("HashtableLookup", std::move(fn));
+ builder.append("HashtableLookup", std::move(fn));
+ }
+ else // NEON
+ {
+ // TODO Enable NEON Support
+ throw std::runtime_error("Not supported, yet");
+ }
};
_builder.addStage(stage);