#include <arm_compute/runtime/CL/functions/CLNormalizationLayerEx.h>
#include <arm_compute/runtime/CL/functions/CLExp.h>
#include <arm_compute/runtime/CL/functions/CLBatchToSpaceND.h>
+#include <arm_compute/runtime/CL/functions/CLEmbeddingLookup.h>
#include <arm_compute/runtime/CL/functions/CLEqual.h>
#include <arm_compute/runtime/CL/functions/CLSquaredDifference.h>
#include <arm_compute/runtime/CL/functions/CLNeg.h>
auto lookups_alloc = ctx.at(::internal::tflite::operand::Index{param.lookups_index});
auto values_alloc = ctx.at(::internal::tflite::operand::Index{param.values_index});
- auto fn = nnfw::make_unique<SimpleEmbeddingLookup>();
+ if (from_env<bool>(std::getenv("USE_SIMPLE_EMBEDDINGLOOKUP")))
+ {
+ auto fn = nnfw::make_unique<SimpleEmbeddingLookup>();
+
+ fn->configure(lookups_alloc, values_alloc, output_alloc);
+
+ builder.append("EmbeddingLookup", std::move(fn));
+ }
+ else if (::internal::arm_compute::isGpuMode())
+ {
+ auto fn = nnfw::make_unique<::arm_compute::CLEmbeddingLookup>();
- fn->configure(lookups_alloc, values_alloc, output_alloc);
+ fn->configure(CAST_CL(values_alloc), CAST_CL(output_alloc), CAST_CL(lookups_alloc));
- builder.append("EmbeddingLookup", std::move(fn));
+ builder.append("EmbeddingLookup", std::move(fn));
+ }
+ else
+ {
+ // TODO Enable NEON Support
+ throw std::runtime_error("Not supported, yet");
+ }
};
_builder.addStage(stage);