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

Illegal instruction (core dumped) #3

Open
chendi1995 opened this issue Jul 31, 2017 · 1 comment
Open

Illegal instruction (core dumped) #3

chendi1995 opened this issue Jul 31, 2017 · 1 comment

Comments

@chendi1995
Copy link

Hello, I use your cutt to do transpose, but I have encountered a problem---'Illegal instruction (core dumped)'. My code is
`int main() {

// Four dimensional tensor
// Transpose (31, 549, 2, 3) -> (3, 31, 2, 549)
int dim[4] = {31, 549, 2, 3};
int permutation[4] = {3, 0, 2, 1};
int size = 1;
for (int i = 0; i < sizeof(permutation) / sizeof(permutation[0]); i++)
{
    size = dim[i]*size;
}
double *idata = new double[size]();
double *odata = new double[size];
// Option 1: Create plan on NULL stream and choose implementation based on heuristics
cuttHandle plan;
cuttCheck(cuttPlan(&plan, 4, dim, permutation, sizeof(double), 0));

// Option 2: Create plan on NULL stream and choose implementation based on performance measurements
// cuttCheck(cuttPlanMeasure(&plan, 4, dim, permutation, sizeof(double), 0, idata, odata));

// Execute plan
cuttCheck(cuttExecute(plan, idata, odata));
cout << odata << endl;

// Destroy plan
cuttCheck(cuttDestroy(plan));
delete[](idata);
delete[](odata);
return 0;

}`

Then , I use gdb and I find the problem happens on cuttCheck(cuttPlan(&plan, 4, dim, permutation, sizeof(double), 0));
I run the cutt_test and the same problem happens.
Thanks.

@DmitryLyakh
Copy link

Make sure you are building it for the right CPU architecture, especially if the platform you are building on has cross-compilation (many Cray platforms).

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

No branches or pull requests

2 participants