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

Update system desc with CPU device information #1271

Open
nsmithtt opened this issue Nov 14, 2024 · 0 comments
Open

Update system desc with CPU device information #1271

nsmithtt opened this issue Nov 14, 2024 · 0 comments
Assignees

Comments

@nsmithtt
Copy link
Contributor

System descriptor is tt-mlir's means for capturing all relevant information about the target system needed for compile. This is the perfect place to store CPU information for executing operations on the host.

Update table SystemDesc with CPU device information, perhaps something like:

enum CPURole: uint16 {
  Host = 0,
  Device = 1,
}

table CPUDesc {
  role: CPURole;
  target_triple: string;
}

table SystemDesc {    
  ...
  cpu_descs: [CPUDesc];
}

Where target triple can be scraped from the current machine via:

clang -dumpmachine
# OR
gcc -dumpmachine

We should collect this information during ttrt's setup.py script and pass this host's target triple information via preprocessor macro -DHOST_TARGET_TRIPLE=$($CC -dumpmachine).

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