-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for not building autoschedulers #6518
Comments
Can you explain what is happening here, a bit? Scanning through thousands of log lines to determine the relevant parts is not quick. |
|
I think we should also evaluate why the Mullapudi autoscheduler assert-fails on RISC-V. I'm guessing it wants a CPU target and is missing an option here. This might be resolved by adding a helper on the target class to distinguish CPUs from accelerators/other targets. |
IMO the assert is bogus and should just be deleted. |
This might actually be a good case for a warning... Mullapudi2016 is not expected to generate good schedules for some targets, but that's not a reason to error out. But we also don't want to leave the opposite impression, right? |
Warnings are not a thing. I can't think of any reason RISC V would be a problem here unless there is some architecture specific data involved, which I don't see on a quick look. (MachineParams is not arch specific, but actual implementation of processor/etc. specific.) If there is some arch specific logic, making RISC V do the same thing as ARM or MIPS is probably fine. |
I don't know what you mean by this. We have dozens of |
Each one represents a failure to either make something a hard error or not a problem to begin with. |
But the assert in question doesn't make sense to me. It allows MIPS, and I guarantee this autoscheduler hasn't been tested on MIPS. It should just be removed. The Mullapudi autoscheduler should work fine on any CPU or DSP-like architecture with multiple cores and a cache. |
As disscussed in halide#6518, this is a bit dubious, and e.g. prevents building on RISC-V.
Andrew's reply is concise and to the point so I will not feel required to be so :-) Warnings are basically worthless. Removing them is a good idea but I'm not sure there is an explicit effort to do so. I would however like to avoid adding more as they are a dysfunctional design. A warning is often a compiler engineer saying "this design sucks, and I cannot fix it, so I'm going to add a message to make myself feel better." They can make sense as part of a linter mode where the programmer is explicitly requesting advisory analysis of the program, but in the default mode of compilation, warnings will generally never be seen. And if they are seen, it will almost certainly be annoying rather than helpful. If the situation is very likely to be a mistake, and there is a straight forward or at least well defined way to write the code that avoids the situation, an error is probably best. Ask if one is programming interactively, will it save time to know this right away or is it more likely to be a possible cleanup for later? If the former, it's an error. If the latter, it's a linter/style/performance-advice thing. Programming cultures I hang out in generally use "treat all warnings as errors" flags. This requires that every warning be fixable somehow. In extreme cases, a specific warning will be suppressed globally, which is a fairly sure sign that the compiler implementation made a bad decision with that warning. Halide doesn't have a "warnings are errors" flag nor a way to suppress certain warnings largely because we're trying to get rid of the warning thing entirely. This thread is a good example to consider:
None of this is intended to cast aspersions on those who thought compiler warnings were an established good design. I've come to the conclusion that they are an antipattern, but only after dealing with them in a number of different build environments and years of experience in the cost/benefit and then having worked on Halide for a while. In the C/C++ world, a fair number of warnings feel like being in the middle of a battle about the language design. E.g.
is legal by the spec but not legal in a defacto sense because it will generate a warning with most compilers. So we have a world where that code is strictly legal, and in a well defined and straight forward fashion, but it wont compile in a lot of environments people actually use. Perhaps the spec ought to evolve to match practice. |
As discussed in halide#6518, this is a bit dubious, and e.g. prevents building on RISC-V, because there is no way to not build autoschedulers currently.
I've gone ahead and drafted up removal of said assertion: #6520 |
As discussed in #6518, this is a bit dubious, and e.g. prevents building on RISC-V, because there is no way to not build autoschedulers currently.
@LebedevRI - why did you close this? |
Ah, because the real issue was actually resolved by #6520 |
Lack of such functionality results in e.g. https://buildd.debian.org/status/fetch.php?pkg=halide&arch=riscv64&ver=13.0.2-2&stamp=1640095586&raw=0
Quoting @alexreinking from chat:
The text was updated successfully, but these errors were encountered: