message: ek.kernel_history take an optional list of KernelType
diff: @@ -284,7 +284,9 @@ PYBIND11_MODULE(enoki_ext, m_) {
  m.def("set_thread_count", &jit_llvm_set_thread_count);
  py::object io = py::module_::import("io");
  - m.def("kernel_history", [io]() {
  + m.def(
  + "kernel_history",
  + [io](py::list types) {
  KernelHistoryEntry *data = jit_kernel_history();
  KernelHistoryEntry *entry = data;
  py::list history;
  @@ -312,12 +314,22 @@ PYBIND11_MODULE(enoki_ext, m_) {
  dict["codegen_time"] = entry->codegen_time;
  dict["backend_time"] = entry->backend_time;
  dict["execution_time"] = entry->execution_time;
  +
  + bool queried_type = types.empty();
  + for (size_t i = 0; i < types.size(); ++i) {
  + KernelType t = types[i].template cast<KernelType>();
  + queried_type |= (t == entry->type);
  + }
  +
  + if (queried_type)
  history.append(dict);
  +
  entry++;
  }
  free(data);
  return history;
  - });
  + },
  + "types"_a = py::list());
  m.def("kernel_history_clear", &jit_kernel_history_clear);
  array_detail.def("graphviz", &jit_var_graphviz);
  