Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic Segfaulting with Tuned Parameters #14

Open
kavon opened this issue Apr 29, 2019 · 0 comments
Open

Periodic Segfaulting with Tuned Parameters #14

kavon opened this issue Apr 29, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kavon
Copy link
Owner

kavon commented Apr 29, 2019

Here's a pretty simple program that segfaults when trying to call the reoptimized function:

// RUN: %atjitc   %s -o %t
// RUN: %t > %t.out
// RUN: %FileCheck %s < %t.out

#include <tuner/driver.h>
#include <tuner/param.h>

using namespace std::placeholders;
using namespace tuned_param;
using namespace easy::options;

size_t someGlobal = 0;

void randomLoop(int seed) {
  for (int i = 0; i < seed; i++)
    someGlobal += 1;
}

int main(int argc, char** argv) {

  tuner::AutoTuner TunerKind = tuner::AT_Bayes;
  const int ITERS = 500;
  tuner::ATDriver AT;

  for (int i = 0; i < ITERS; i++) {
    auto const &OptimizedFun = AT.reoptimize(randomLoop,
          IntRange(0, 32768),
          tuner_kind(TunerKind));

    OptimizedFun();
  }

  return 0;
}
@kavon kavon changed the title Periodic Segfaulting Periodic Segfaulting with Tuned Parameters Apr 29, 2019
@kavon kavon self-assigned this Apr 29, 2019
@kavon kavon added the bug Something isn't working label Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant