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
[Feature Request] Support loading kernel soruce from relative and absolute path #6819
Comments
IMHO, this is fairly high priority - the it works now is sorta stupid for end users. Unfortunately it'll have to wait a bit for resources. |
I fired this up to a P1, but it's runtime team's board, so feel free to do whatever with priority. |
I suggest:
|
@tt-dma , Paul and I had a quick chat, we should do the following:
That shouldn't break anything today, and absolute path takes precedence over relative if both exists to avoid surprises if absolute path already exists |
PR #6922 implements support for absolute and relative (to |
Is your feature request related to a problem? Please describe.
I've been writing out-of-tree Matalium applications over the weekends. Currently I am forced to create a symlink under
TT_METAL_HOME
to getCreateKernel
to load my own kernels.For example, I've a kernel under
/home/marty/copy.cpp
. And have attempt to load itThis always fails as Metalium unconditionally prepends
TT_METAL_HOME
to my specified load path.I am forced to create a symlink to workaround it. This is not piratical in real world applications.
ln -s /path/to/my_kernels/ $TT_METAL_HOME/my_kernels
Then load it as
Describe the solution you'd like
CreateKernel
should attempt to interpret absolute path as absolute and load the kernel without prependingTT_METAL_HOME
. And relative paths should be treated as such. Searching underTT_METAL_HOME
should be a fallback herbivorous.Describe alternatives you've considered
Alternative APIs like
CreateKernel(program, kernel_src_str, etc..)
like OpenCL's clCreateProgramWithSource would be nice too. Although I see most applications ended using this kind of API and would strongly prefer the non-alternative solutin.Additional context
None.
The text was updated successfully, but these errors were encountered: